mirror of
https://github.com/casdoor/casdoor.git
synced 2025-07-18 21:53:50 +08:00
feat: fix the issue of jumping back to the login page after resetting password (#1288)
* fix: redirect to login page * fix: front end router * fix: front end router * fix: signup page router * fix: redirect to login page
This commit is contained in:
@ -22,6 +22,7 @@ import i18next from "i18next";
|
||||
import AffiliationSelect from "../common/AffiliationSelect";
|
||||
import OAuthWidget from "../common/OAuthWidget";
|
||||
import SelectRegionBox from "../SelectRegionBox";
|
||||
import {withRouter} from "react-router-dom";
|
||||
|
||||
class PromptPage extends React.Component {
|
||||
constructor(props) {
|
||||
@ -190,7 +191,7 @@ class PromptPage extends React.Component {
|
||||
if (redirectUrl !== "" && redirectUrl !== null) {
|
||||
Setting.goToLink(redirectUrl);
|
||||
} else {
|
||||
Setting.redirectToLoginPage(this.getApplicationObj());
|
||||
Setting.redirectToLoginPage(this.getApplicationObj(), this.props.history);
|
||||
}
|
||||
} else {
|
||||
Setting.showMessage("error", `Failed to log out: ${res.msg}`);
|
||||
@ -234,7 +235,7 @@ class PromptPage extends React.Component {
|
||||
title="Sign Up Error"
|
||||
subTitle={"You are unexpected to see this prompt page"}
|
||||
extra={[
|
||||
<Button type="primary" key="signin" onClick={() => Setting.redirectToLoginPage(application)}>
|
||||
<Button type="primary" key="signin" onClick={() => Setting.redirectToLoginPage(application, this.props.history)}>
|
||||
{
|
||||
i18next.t("login:Sign In")
|
||||
}
|
||||
@ -272,4 +273,4 @@ class PromptPage extends React.Component {
|
||||
}
|
||||
}
|
||||
|
||||
export default PromptPage;
|
||||
export default withRouter(PromptPage);
|
||||
|
Reference in New Issue
Block a user