Skip to content

Commit

Permalink
fix(console): can not reset password (#1150)
Browse files Browse the repository at this point in the history
  • Loading branch information
jialeicui authored Sep 8, 2022
1 parent 3f6794c commit 97b1d08
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions console/src/api/ApiHeader.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,9 @@ export default function ApiHeader() {

if (error.response?.status === 401 && error.config.method === 'get') {
const withUnAuthRoute =
['/login', '/signup', '/create-account'].filter((path) => winLocation.pathname.includes(path))
.length > 0
['/login', '/signup', '/create-account', '/reset'].filter((path) =>
winLocation.pathname.includes(path)
).length > 0
const search = qs.parse(winLocation.search, { ignoreQueryPrefix: true })
let { redirect } = search
if (redirect && typeof redirect === 'string') {
Expand Down
2 changes: 1 addition & 1 deletion console/src/pages/Home/ResetPassword.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ export default function ResetPassword() {
async (password: string) => {
await resetPassword(password, verification)
toaster.positive(t('Reset Password Success'), { autoHideDuration: 3000 })
history.push('/')
history.push('/login')
},
[verification, t, history]
)
Expand Down

0 comments on commit 97b1d08

Please sign in to comment.