Skip to content

Commit

Permalink
fix(clerk-js): Use strict equality operator to check for lockout erro…
Browse files Browse the repository at this point in the history
…rs in handleRedirectCallback (#2072) (#2075)

(cherry picked from commit 034abeb)

Co-authored-by: Mark Pitsilos <[email protected]>
  • Loading branch information
clerk-cookie and yourtallness authored Nov 7, 2023
1 parent 9a065cd commit 068aded
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
5 changes: 5 additions & 0 deletions .changeset/clever-vans-flash.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@clerk/clerk-js': patch
---

Use strict equality operator to check for lockout errors in handleRedirectCallback
4 changes: 2 additions & 2 deletions packages/clerk-js/src/core/clerk.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1036,8 +1036,8 @@ export default class Clerk implements ClerkInterface {
}
}

const userLockedFromSignUp = su.externalAccountErrorCode == 'user_locked';
const userLockedFromSignIn = si.firstFactorVerificationErrorCode == 'user_locked';
const userLockedFromSignUp = su.externalAccountErrorCode === 'user_locked';
const userLockedFromSignIn = si.firstFactorVerificationErrorCode === 'user_locked';

if (userLockedFromSignUp) {
return navigateToSignUp();
Expand Down

0 comments on commit 068aded

Please sign in to comment.