mirror of
https://github.com/codeninjasllc/discourse.git
synced 2024-11-23 23:58:31 -05:00
FIX: redirect signup to sso url if sso enabled
This commit is contained in:
parent
d07adc9d72
commit
0314685627
1 changed files with 6 additions and 1 deletions
|
@ -172,7 +172,12 @@ const ApplicationRoute = Discourse.Route.extend(OpenComposer, {
|
||||||
},
|
},
|
||||||
|
|
||||||
handleShowCreateAccount() {
|
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) {
|
_autoLogin(modal, modalClass, notAuto) {
|
||||||
|
|
Loading…
Reference in a new issue