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
7 changes: 7 additions & 0 deletions .changeset/pink-taxes-do.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
'@clerk/ui': patch
---

Remove back button on the sign-in password compromised/pwned error screen.

These errors are not recoverable by re-entering the password, so the back button led to a confusing dead end that would always take you back to the same error.
3 changes: 2 additions & 1 deletion packages/ui/src/components/SignIn/SignInFactorOne.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,8 @@ function SignInFactorOneInternal(): JSX.Element {
}

if (showAllStrategies || showForgotPasswordStrategies) {
const canGoBack = factorHasLocalStrategy(currentFactor);
// Password errors are not recoverable by re-entering the password, so we hide the back button
const canGoBack = factorHasLocalStrategy(currentFactor) && !passwordErrorCode;
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

passwordErrorCode is to me not a very clear name for this flag (it sounds more general than it is) but I confirmed that it is just a union of 'compromised' | 'pwned' so it's exactly what we want to check.


const toggle = showAllStrategies ? toggleAllStrategies : toggleForgotPasswordStrategies;
const backHandler = () => {
Expand Down
Loading