Commit e37d7bc4f0d620b6f27cc4ed784d3fe47f522ab0

Authored by Victor Costa
1 parent 7a4a7997

oauth_client: fix popup check

plugins/oauth_client/controllers/public/oauth_client_plugin_public_controller.rb
@@ -19,7 +19,7 @@ class OauthClientPluginPublicController < PublicController @@ -19,7 +19,7 @@ class OauthClientPluginPublicController < PublicController
19 end 19 end
20 20
21 def finish 21 def finish
22 - if session.delete(:oauth_client_popup) 22 + if session.delete(:oauth_client_popup) || request.env.fetch('omniauth.params', {})['oauth_client_popup']
23 current_user.private_token_expired? if current_user.present? 23 current_user.private_token_expired? if current_user.present?
24 private_token = current_user.present? ? current_user.private_token : '' 24 private_token = current_user.present? ? current_user.private_token : ''
25 render 'oauth_client_plugin_public/finish', :locals => {:private_token => private_token, :user => params[:user]}, :layout => false 25 render 'oauth_client_plugin_public/finish', :locals => {:private_token => private_token, :user => params[:user]}, :layout => false