mirror of
https://github.com/discourse/discourse.git
synced 2025-06-06 13:06:56 +08:00
FIX: redirect signup to sso url if sso enabled
This commit is contained in:
@ -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) {
|
||||||
|
Reference in New Issue
Block a user