feat: fix SAML failed to redirect issue when login api returns RequiredMfa (#3364)

This commit is contained in:
DacongDA
2024-11-21 20:31:56 +08:00
committed by GitHub
parent dff65eee20
commit 8484465d09

View File

@ -488,6 +488,10 @@ class LoginPage extends React.Component {
const accessToken = res.data; const accessToken = res.data;
Setting.goToLink(`${oAuthParams.redirectUri}#${amendatoryResponseType}=${accessToken}&state=${oAuthParams.state}&token_type=bearer`); Setting.goToLink(`${oAuthParams.redirectUri}#${amendatoryResponseType}=${accessToken}&state=${oAuthParams.state}&token_type=bearer`);
} else if (responseType === "saml") { } else if (responseType === "saml") {
if (res.data === RequiredMfa) {
this.props.onLoginSuccess(window.location.href);
return;
}
if (res.data2.needUpdatePassword) { if (res.data2.needUpdatePassword) {
sessionStorage.setItem("signinUrl", window.location.href); sessionStorage.setItem("signinUrl", window.location.href);
Setting.goToLink(this, `/forget/${this.state.applicationName}`); Setting.goToLink(this, `/forget/${this.state.applicationName}`);