Skip to content
Open
Show file tree
Hide file tree
Changes from 2 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/neat-cloths-dig.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@clerk/clerk-js': minor
---

Handle the `needs_new_password` sign in status when signing in via password.
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,8 @@ export const SignInFactorOnePasswordCard = (props: SignInFactorOnePasswordProps)
return setActive({ session: res.createdSessionId, redirectUrl: afterSignInUrl });
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
2 changes: 2 additions & 0 deletions packages/clerk-js/src/ui/components/SignIn/SignInStart.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -229,6 +229,8 @@ function SignInStartInternal(): JSX.Element {
return navigate('factor-one');
case 'needs_second_factor':
return navigate('factor-two');
case 'needs_new_password':
return navigate('../reset-password');
case 'complete':
removeClerkQueryParam('__clerk_ticket');
return clerk.setActive({
Expand Down
Loading