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

View file

@ -172,7 +172,12 @@ const ApplicationRoute = Discourse.Route.extend(OpenComposer, {
},
handleShowCreateAccount() {
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) {