mirror of
https://github.com/casdoor/casdoor.git
synced 2025-07-04 05:10:19 +08:00
feat: fix SAML failed to redirect issue when login api returns RequiredMfa (#3364)
This commit is contained in:
@ -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}`);
|
||||||
|
Reference in New Issue
Block a user