FIX: fullscreen login set from client needs to be respected

This commit is contained in:
Sam 2016-08-29 10:13:32 +10:00
parent 2251104e32
commit 22b8c0d44e
2 changed files with 3 additions and 1 deletions

View File

@ -132,6 +132,7 @@ export default Ember.Controller.extend(ModalFunctionality, {
} else {
const authUrl = loginMethod.get('customUrl') || Discourse.getURL("/auth/" + name);
if (loginMethod.get("fullScreenLogin")) {
document.cookie = "fsl=true";
window.location = authUrl;
} else {
this.set('authenticate', name);

View File

@ -57,7 +57,8 @@ class Users::OmniauthCallbacksController < ApplicationController
@auth_result.authenticator_name = authenticator.name
complete_response_data
if provider && provider.full_screen_login
if provider && (provider.full_screen_login || cookies['fsl'])
cookies.delete('fsl')
cookies['_bypass_cache'] = true
flash[:authentication_data] = @auth_result.to_client_hash.to_json
redirect_to @origin