mirror of
https://github.com/logto-io/logto.git
synced 2025-01-20 21:32:31 -05:00
fix(experience): use absolute path for password sign-in form nav (#4973)
should use absolute path for the password sign-in form navigation
This commit is contained in:
parent
030877b656
commit
66d6491d2e
2 changed files with 6 additions and 6 deletions
|
@ -127,7 +127,7 @@ describe('IdentifierSignInForm', () => {
|
||||||
await waitFor(() => {
|
await waitFor(() => {
|
||||||
expect(sendVerificationCodeApi).not.toBeCalled();
|
expect(sendVerificationCodeApi).not.toBeCalled();
|
||||||
expect(mockedNavigate).toBeCalledWith(
|
expect(mockedNavigate).toBeCalledWith(
|
||||||
{ pathname: 'password' },
|
{ pathname: '/sign-in/password' },
|
||||||
{ state: { identifier: SignInIdentifier.Username, value } }
|
{ state: { identifier: SignInIdentifier.Username, value } }
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
@ -145,7 +145,7 @@ describe('IdentifierSignInForm', () => {
|
||||||
await waitFor(() => {
|
await waitFor(() => {
|
||||||
expect(sendVerificationCodeApi).not.toBeCalled();
|
expect(sendVerificationCodeApi).not.toBeCalled();
|
||||||
expect(mockedNavigate).toBeCalledWith(
|
expect(mockedNavigate).toBeCalledWith(
|
||||||
{ pathname: 'password' },
|
{ pathname: '/sign-in/password' },
|
||||||
{
|
{
|
||||||
state: {
|
state: {
|
||||||
identifier,
|
identifier,
|
||||||
|
@ -199,7 +199,7 @@ describe('IdentifierSignInForm', () => {
|
||||||
await waitFor(() => {
|
await waitFor(() => {
|
||||||
expect(getSingleSignOnConnectorsMock).not.toBeCalled();
|
expect(getSingleSignOnConnectorsMock).not.toBeCalled();
|
||||||
expect(mockedNavigate).toBeCalledWith(
|
expect(mockedNavigate).toBeCalledWith(
|
||||||
{ pathname: 'password' },
|
{ pathname: '/sign-in/password' },
|
||||||
{ state: { identifier: SignInIdentifier.Username, value: username } }
|
{ state: { identifier: SignInIdentifier.Username, value: username } }
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
@ -224,7 +224,7 @@ describe('IdentifierSignInForm', () => {
|
||||||
await waitFor(() => {
|
await waitFor(() => {
|
||||||
expect(getSingleSignOnConnectorsMock).not.toBeCalled();
|
expect(getSingleSignOnConnectorsMock).not.toBeCalled();
|
||||||
expect(mockedNavigate).toBeCalledWith(
|
expect(mockedNavigate).toBeCalledWith(
|
||||||
{ pathname: 'password' },
|
{ pathname: '/sign-in/password' },
|
||||||
{ state: { identifier: SignInIdentifier.Email, value: email } }
|
{ state: { identifier: SignInIdentifier.Email, value: email } }
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
@ -254,7 +254,7 @@ describe('IdentifierSignInForm', () => {
|
||||||
await waitFor(() => {
|
await waitFor(() => {
|
||||||
expect(getSingleSignOnConnectorsMock).toBeCalled();
|
expect(getSingleSignOnConnectorsMock).toBeCalled();
|
||||||
expect(mockedNavigate).toBeCalledWith(
|
expect(mockedNavigate).toBeCalledWith(
|
||||||
{ pathname: 'password' },
|
{ pathname: '/sign-in/password' },
|
||||||
{ state: { identifier: SignInIdentifier.Email, value: email } }
|
{ state: { identifier: SignInIdentifier.Email, value: email } }
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|
|
@ -17,7 +17,7 @@ const useOnSubmit = (signInMethods: SignIn['methods']) => {
|
||||||
(identifier: SignInIdentifier, value: string) => {
|
(identifier: SignInIdentifier, value: string) => {
|
||||||
navigate(
|
navigate(
|
||||||
{
|
{
|
||||||
pathname: 'password',
|
pathname: `/${UserFlow.SignIn}/password`,
|
||||||
},
|
},
|
||||||
{ state: { identifier, value } }
|
{ state: { identifier, value } }
|
||||||
);
|
);
|
||||||
|
|
Loading…
Add table
Reference in a new issue