mirror of
https://github.com/casdoor/casdoor.git
synced 2025-07-04 05:10:19 +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:
@ -23,6 +23,7 @@ import {CountDownInput} from "../common/CountDownInput";
|
||||
import * as UserBackend from "../backend/UserBackend";
|
||||
import {CheckCircleOutlined, KeyOutlined, LockOutlined, SolutionOutlined, UserOutlined} from "@ant-design/icons";
|
||||
import CustomGithubCorner from "../CustomGithubCorner";
|
||||
import {withRouter} from "react-router-dom";
|
||||
|
||||
const {Step} = Steps;
|
||||
const {Option} = Select;
|
||||
@ -166,7 +167,7 @@ class ForgetPage extends React.Component {
|
||||
values.userOwner = this.state.application?.organizationObj.name;
|
||||
UserBackend.setPassword(values.userOwner, values.username, "", values?.newPassword).then(res => {
|
||||
if (res.status === "ok") {
|
||||
Setting.redirectToLoginPage(this.state.application);
|
||||
Setting.redirectToLoginPage(this.state.application, this.props.history);
|
||||
} else {
|
||||
Setting.showMessage("error", i18next.t(`signup:${res.msg}`));
|
||||
}
|
||||
@ -550,4 +551,4 @@ class ForgetPage extends React.Component {
|
||||
}
|
||||
}
|
||||
|
||||
export default ForgetPage;
|
||||
export default withRouter(ForgetPage);
|
||||
|
Reference in New Issue
Block a user