FEATURE: Use full page redirection for all external auth methods (#8092)

Using popups is becoming increasingly rare. Full page redirects are already used on mobile, and for some providers. This commit removes all logic related to popup authentication, leaving only the full page redirect method.

For more info, see https://meta.discourse.org/t/do-we-need-popups-for-login/127988
This commit is contained in:
David Taylor
2019-10-08 12:10:43 +01:00
committed by GitHub
parent 20514f2e44
commit d2bceff133
21 changed files with 92 additions and 271 deletions

View File

@@ -724,9 +724,6 @@ class ApplicationController < ActionController::Base
session[:destination_url] = destination_url
redirect_to path('/session/sso')
return
elsif params[:authComplete].present?
redirect_to path("/login?authComplete=true")
return
else
# save original URL in a cookie (javascript redirects after login in this case)
cookies[:destination_url] = destination_url

View File

@@ -71,18 +71,9 @@ class Users::OmniauthCallbacksController < ApplicationController
else
@auth_result.authenticator_name = authenticator.name
complete_response_data
if provider&.full_screen_login || cookies['fsl']
cookies.delete('fsl')
cookies['_bypass_cache'] = true
cookies[:authentication_data] = @auth_result.to_client_hash.to_json
redirect_to @origin
else
respond_to do |format|
format.html
format.json { render json: @auth_result.to_client_hash }
end
end
cookies['_bypass_cache'] = true
cookies[:authentication_data] = @auth_result.to_client_hash.to_json
redirect_to @origin
end
end