mirror of
https://github.com/casdoor/casdoor.git
synced 2025-05-23 02:35:49 +08:00
feat: fix login page path after logout (#2493)
Co-authored-by: aidenlu <aiden_lu@wochacha.com>
This commit is contained in:
parent
23f4684e1d
commit
23d4488b64
@ -492,7 +492,14 @@ class App extends Component {
|
|||||||
sessionStorage.setItem("from", window.location.pathname);
|
sessionStorage.setItem("from", window.location.pathname);
|
||||||
return <Redirect to="/login" />;
|
return <Redirect to="/login" />;
|
||||||
} else if (this.state.account === undefined) {
|
} else if (this.state.account === undefined) {
|
||||||
|
sessionStorage.setItem("from", window.location.pathname);
|
||||||
|
const organization = localStorage.getItem("loginOrganization");
|
||||||
|
if (organization !== "undefined" && organization && organization !== "built-in") {
|
||||||
|
const loginPath = `/login/${organization}`;
|
||||||
|
return <Redirect to={loginPath} />;
|
||||||
|
} else {
|
||||||
return null;
|
return null;
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
return component;
|
return component;
|
||||||
}
|
}
|
||||||
|
@ -411,6 +411,7 @@ class LoginPage extends React.Component {
|
|||||||
};
|
};
|
||||||
|
|
||||||
if (res.status === "ok") {
|
if (res.status === "ok") {
|
||||||
|
localStorage.setItem("loginOrganization", values["organization"]);
|
||||||
if (res.data === NextMfa) {
|
if (res.data === NextMfa) {
|
||||||
this.setState({
|
this.setState({
|
||||||
getVerifyTotp: () => {
|
getVerifyTotp: () => {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user