Commit e8f6202d16f4ca74c854c85b375a841869befe77
1 parent
8b18bd6f
Exists in
theme-brasil-digital-from-staging
and in
9 other branches
oauth_client: fix oauth login flow
Showing
1 changed file
with
2 additions
and
1 deletions
Show diff stats
plugins/oauth_client/lib/oauth_client_plugin.rb
... | ... | @@ -56,7 +56,8 @@ class OauthClientPlugin < Noosfero::Plugin |
56 | 56 | domain = Domain.find_by_name(request.host) |
57 | 57 | environment = domain.environment rescue Environment.default |
58 | 58 | |
59 | - provider_id = request.session['omniauth.params'] ? request.session['omniauth.params']['id'] : request.params['id'] | |
59 | + provider_id = request.params['id'] | |
60 | + provider_id ||= request.session['omniauth.params']['id'] if request.session['omniauth.params'] | |
60 | 61 | provider = environment.oauth_providers.find(provider_id) |
61 | 62 | strategy.options.merge!(provider.options.symbolize_keys) |
62 | 63 | ... | ... |