only auto-sso when disable_custom_urls is true

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
This commit is contained in:
Michael Telatynski 2020-03-27 12:01:10 +00:00
parent 98f9f1e956
commit 548e918437

View file

@ -435,7 +435,8 @@ export default createReactClass({
// if this is the initial render and the flow we choose is SSO/CAS then go to it automatically
// we do not do this when the user has changed to the server manually as that may be jarring.
if (initial && SSO_FLOWS.includes(flows[i].type)) {
// Only allow it when disable_custom_urls is asserted so that we don't prevent user from changing HS URL
if (initial && SdkConfig.get()['disable_custom_urls'] && SSO_FLOWS.includes(flows[i].type)) {
const tmpCli = this._loginLogic.createTemporaryClient();
PlatformPeg.get().startSingleSignOn(tmpCli, flows[i].type === M_LOGIN_SSO ? "sso": "cas", true);
}