Commit dd90e51d70d6a175d40bcad08f1b31575b4efe54
1 parent
e37d7bc4
Exists in
staging
and in
4 other branches
oauth_client: fix popup check
Showing
1 changed file
with
2 additions
and
2 deletions
Show diff stats
plugins/oauth_client/controllers/public/oauth_client_plugin_public_controller.rb
... | ... | @@ -19,7 +19,7 @@ class OauthClientPluginPublicController < PublicController |
19 | 19 | end |
20 | 20 | |
21 | 21 | def finish |
22 | - if session.delete(:oauth_client_popup) || request.env.fetch('omniauth.params', {})['oauth_client_popup'] | |
22 | + if session.delete(:oauth_client_popup) || params[:oauth_client_popup] | |
23 | 23 | current_user.private_token_expired? if current_user.present? |
24 | 24 | private_token = current_user.present? ? current_user.private_token : '' |
25 | 25 | render 'oauth_client_plugin_public/finish', :locals => {:private_token => private_token, :user => params[:user]}, :layout => false |
... | ... | @@ -56,7 +56,7 @@ class OauthClientPluginPublicController < PublicController |
56 | 56 | name ||= auth.extra && auth.extra.raw_info ? auth.extra.raw_info.name : '' |
57 | 57 | |
58 | 58 | if session[:oauth_client_popup] |
59 | - redirect_to :controller => :oauth_client_plugin_public, :action => :finish, :user => {:login => login, :email => auth.info.email, :oauth_providers => [session[:provider_id]]}, :profile_data => {:name => name} | |
59 | + redirect_to :controller => :oauth_client_plugin_public, :action => :finish, :user => {:login => login, :email => auth.info.email, :oauth_providers => [session[:provider_id]]}, :profile_data => {:name => name}, :oauth_client_popup => session[:oauth_client_popup] | |
60 | 60 | else |
61 | 61 | redirect_to :controller => :account, :action => :signup, :user => {:login => login, :email => auth.info.email}, :profile_data => {:name => name} |
62 | 62 | end | ... | ... |