-
Notifications
You must be signed in to change notification settings - Fork 290
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(clerk-js): Show error during instant password error #4910
base: main
Are you sure you want to change the base?
fix(clerk-js): Show error during instant password error #4910
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
🦋 Changeset detectedLatest commit: b69e14f The changes in this PR will be included in the next version bump. This PR includes changesets to release 3 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
'@clerk/clerk-js': patch | ||
--- | ||
|
||
Show password error for incorrect passwords during instant password verification. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Show password error for incorrect passwords during instant password verification. | |
Show error for incorrect passwords during instant password verification. |
@@ -123,6 +123,15 @@ testAgainstRunningApps({ withEnv: [appConfigs.envs.withEmailCodes] })('sign in f | |||
await u.po.expect.toBeSignedOut(); | |||
}); | |||
|
|||
test('cannot sign in with email and wrong instant password', async ({ page, context }) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👏
@@ -355,7 +355,7 @@ export function _SignInStart(): JSX.Element { | |||
); | |||
|
|||
if (instantPasswordError) { | |||
await signInWithFields(identifierField); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Interesting, so this was actually intentional 🤔 I'm wondering if we want to continue to move to the factor-one view but show an error, or if we want to keep them on the start view. What do you think?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What was the intention here ? Why do we think navigating them to another screen is better (even with your proposed fix) ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Likely to automatically give them another sign in option if one is available, without requiring additional action. If they have another auth option available they would now have to manually empty the password field and click continue. The start screen isn't setup to give them additional options (e.g. no "forgot password" link). It's possible someone gets stuck in this error case.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sounds like a state that you can find yourself if your password manager is not up to date and still tries to use a password that you had before. Yeah I get it now. Let's add a comment in that line that explains the intent, i this this will be useful for the future.
Description
When an password is incorrectly autofilled during sign-in, render an incorrect password error vs moving to first factor.
Screen.Recording.2025-01-16.at.9.27.17.AM.mov
Fixes SDK-2029
Checklist
pnpm test
runs as expected.pnpm build
runs as expected.Type of change