mirror of
https://github.com/logto-io/logto.git
synced 2024-12-30 20:33:54 -05:00
Merge pull request #3121 from logto-io/simeng-continue-flow-code-verification
fix(ui): fix continue flow verification-code 404 bug
This commit is contained in:
commit
c6e3ecb23c
4 changed files with 8 additions and 7 deletions
|
@ -95,14 +95,14 @@ const App = () => {
|
|||
<Route path="reset" element={<ResetPassword />} />
|
||||
</Route>
|
||||
|
||||
{/* Passwordless verification code */}
|
||||
<Route path=":flow/verification-code" element={<VerificationCode />} />
|
||||
|
||||
{/* Continue set up missing profile */}
|
||||
<Route path="continue">
|
||||
<Route path=":method" element={<Continue />} />
|
||||
</Route>
|
||||
|
||||
{/* Passwordless verification code */}
|
||||
<Route path=":flow/verification-code" element={<VerificationCode />} />
|
||||
|
||||
{/* Social sign-in pages */}
|
||||
<Route path="social">
|
||||
<Route path="link/:connectorId" element={<SocialLinkAccount />} />
|
||||
|
|
|
@ -46,7 +46,7 @@ const useSendVerificationCode = (flow: UserFlow, replaceCurrentPage?: boolean) =
|
|||
if (result) {
|
||||
navigate(
|
||||
{
|
||||
pathname: `verification-code`,
|
||||
pathname: `/${flow}/verification-code`,
|
||||
search: location.search,
|
||||
},
|
||||
{
|
||||
|
|
|
@ -5,7 +5,7 @@ import { MemoryRouter } from 'react-router-dom';
|
|||
|
||||
import renderWithPageContext from '@/__mocks__/RenderWithPageContext';
|
||||
import { putInteraction, sendVerificationCode } from '@/apis/interaction';
|
||||
import { VerificationCodeIdentifier } from '@/types';
|
||||
import { UserFlow, VerificationCodeIdentifier } from '@/types';
|
||||
|
||||
import ForgotPasswordForm from '.';
|
||||
|
||||
|
@ -81,7 +81,7 @@ describe('ForgotPasswordForm', () => {
|
|||
expect(sendVerificationCode).toBeCalledWith({ email });
|
||||
expect(mockedNavigate).toBeCalledWith(
|
||||
{
|
||||
pathname: 'verification-code',
|
||||
pathname: `/${UserFlow.forgotPassword}/verification-code`,
|
||||
search: '',
|
||||
},
|
||||
{ state: { identifier, value }, replace: undefined }
|
||||
|
|
|
@ -7,6 +7,7 @@ import {
|
|||
putInteraction,
|
||||
sendVerificationCode,
|
||||
} from '@/apis/interaction';
|
||||
import { UserFlow } from '@/types';
|
||||
|
||||
import PasswordForm from '.';
|
||||
|
||||
|
@ -89,7 +90,7 @@ describe('PasswordSignInForm', () => {
|
|||
|
||||
expect(mockedNavigate).toBeCalledWith(
|
||||
{
|
||||
pathname: 'verification-code',
|
||||
pathname: `/${UserFlow.signIn}/verification-code`,
|
||||
search: '',
|
||||
},
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue