Commit 150a39b3 authored by Eugen Rochko's avatar Eugen Rochko

Another possible fix

parent f2d1e645
......@@ -13,7 +13,7 @@ class User < ApplicationRecord
class << self
def from_omniauth(auth, current_user)
authorization = Authorization.where(provider: auth.provider, uid: auth.uid.to_s).first_or_initialize
authorization = Authorization.where(provider: auth.provider, uid: auth.uid.to_s).first_or_initialize(provider: auth.provider, uid: auth.uid.to_s)
user = current_user || authorization.user || User.new
authorization.user = user
authorization.token = auth.credentials.token
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment