mirror of
https://github.com/discourse/discourse.git
synced 2025-06-01 09:08:10 +08:00
FIX: fullscreen login set from client needs to be respected
This commit is contained in:
@ -132,6 +132,7 @@ export default Ember.Controller.extend(ModalFunctionality, {
|
|||||||
} else {
|
} else {
|
||||||
const authUrl = loginMethod.get('customUrl') || Discourse.getURL("/auth/" + name);
|
const authUrl = loginMethod.get('customUrl') || Discourse.getURL("/auth/" + name);
|
||||||
if (loginMethod.get("fullScreenLogin")) {
|
if (loginMethod.get("fullScreenLogin")) {
|
||||||
|
document.cookie = "fsl=true";
|
||||||
window.location = authUrl;
|
window.location = authUrl;
|
||||||
} else {
|
} else {
|
||||||
this.set('authenticate', name);
|
this.set('authenticate', name);
|
||||||
|
@ -57,7 +57,8 @@ class Users::OmniauthCallbacksController < ApplicationController
|
|||||||
@auth_result.authenticator_name = authenticator.name
|
@auth_result.authenticator_name = authenticator.name
|
||||||
complete_response_data
|
complete_response_data
|
||||||
|
|
||||||
if provider && provider.full_screen_login
|
if provider && (provider.full_screen_login || cookies['fsl'])
|
||||||
|
cookies.delete('fsl')
|
||||||
cookies['_bypass_cache'] = true
|
cookies['_bypass_cache'] = true
|
||||||
flash[:authentication_data] = @auth_result.to_client_hash.to_json
|
flash[:authentication_data] = @auth_result.to_client_hash.to_json
|
||||||
redirect_to @origin
|
redirect_to @origin
|
||||||
|
Reference in New Issue
Block a user