diff --git a/app/controllers/registrations_controller.rb b/app/controllers/registrations_controller.rb index 4e39f9a..7931123 100644 --- a/app/controllers/registrations_controller.rb +++ b/app/controllers/registrations_controller.rb @@ -17,14 +17,14 @@ unless oauth.nil? # The OAuth provider could not be determined or there was no unique UID! - if oauth.provider.nil? || oauth.uid.nil? + if oauth[:provider].nil? || oauth[:uid].nil? flash[:notice] = t('identifier_schemes.new_login_failure') else # Connect the new user with the identifier sent back by the OAuth provider flash[:notice] = t('identifier_schemes.new_login_success') - UserIdentifier.create(identifier_scheme: oauth.provider.upcase, - identifier: oauth.uid, + UserIdentifier.create(identifier_scheme: oauth[:provider].upcase, + identifier: oauth[:uid], user: @user) end end