fix: update reset password token when email code verify success (#18364)
This commit is contained in:
parent
4247a6b807
commit
7ba3e599d2
2 changed files with 6 additions and 2 deletions
|
|
@ -39,7 +39,11 @@ export default function CheckCode() {
|
|||
}
|
||||
setIsLoading(true)
|
||||
const ret = await verifyResetPasswordCode({ email, code, token })
|
||||
ret.is_valid && router.push(`/reset-password/set-password?${searchParams.toString()}`)
|
||||
if (ret.is_valid) {
|
||||
const params = new URLSearchParams(searchParams)
|
||||
params.set('token', encodeURIComponent(ret.token))
|
||||
router.push(`/reset-password/set-password?${params.toString()}`)
|
||||
}
|
||||
}
|
||||
catch (error) { console.error(error) }
|
||||
finally {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue