FIX: redirect signup to sso url if sso enabled

This commit is contained in:
Arpit Jalan 2015-07-06 20:21:18 +05:30
parent d07adc9d72
commit 0314685627
1 changed files with 6 additions and 1 deletions

View File

@ -172,7 +172,12 @@ const ApplicationRoute = Discourse.Route.extend(OpenComposer, {
},
handleShowCreateAccount() {
this._autoLogin('createAccount', 'create-account');
if (this.siteSettings.enable_sso) {
const returnPath = encodeURIComponent(window.location.pathname);
window.location = Discourse.getURL('/session/sso?return_path=' + returnPath);
} else {
this._autoLogin('createAccount', 'create-account');
}
},
_autoLogin(modal, modalClass, notAuto) {