Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/strange-zoos-tie.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@clerk/clerk-js': patch
---

We are rolling back support for password complexity / strength checks during sign-in. Feature will be limited to HIBP for now. Hence, the password form need not expect a sign_in status of `needs_new_password`.
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,6 @@ export const SignInFactorOnePasswordCard = (props: SignInFactorOnePasswordProps)
return setActive({ session: res.createdSessionId, beforeEmit: navigateAfterSignIn });
case 'needs_second_factor':
return navigate('../factor-two');
case 'needs_new_password':
return navigate('../reset-password');
default:
return console.error(clerkInvalidFAPIResponse(res.status, supportEmail));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -227,29 +227,6 @@ describe('SignInFactorOne', () => {
});
});
});

it('redirects to `reset-password` if signIn requires a new password', async () => {
const { wrapper, fixtures } = await createFixtures(f => {
f.withEmailAddress();
f.withPassword();
f.withPreferredSignInStrategy({ strategy: 'password' });
f.startSignInWithPhoneNumber({ supportPassword: true });
});
fixtures.signIn.prepareFirstFactor.mockReturnValueOnce(Promise.resolve({} as SignInResource));

fixtures.signIn.attemptFirstFactor.mockReturnValueOnce(
Promise.resolve({ status: 'needs_new_password' } as SignInResource),
);

await runFakeTimers(async () => {
const { userEvent } = render(<SignInFactorOne />, { wrapper });
await userEvent.type(screen.getByLabelText('Password'), '123456');
await userEvent.click(screen.getByText('Continue'));
await waitFor(() => {
expect(fixtures.router.navigate).toHaveBeenCalledWith('../reset-password');
});
});
});
});

describe('Forgot Password', () => {
Expand Down