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/modern-bobcats-love.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@clerk/clerk-js': patch
---

Bug Fix: When authenticating with a passkey and user was looked out an error was thrown for accessing an undefined variable
6 changes: 3 additions & 3 deletions packages/clerk-js/src/ui/components/SignIn/shared.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@ import { handleError } from '../../utils';

function useHandleAuthenticateWithPasskey(onSecondFactor: () => Promise<unknown>) {
const card = useCardState();
const { setActive } = useClerk();
// @ts-expect-error -- private method for the time being
const { setActive, __internal_navigateWithError } = useClerk();
const supportEmail = useSupportEmail();
const { navigateAfterSignIn } = useSignInContext();
const { authenticateWithPasskey } = useCoreSignIn();
Expand Down Expand Up @@ -48,8 +49,7 @@ function useHandleAuthenticateWithPasskey(onSecondFactor: () => Promise<unknown>
}

if (isUserLockedError(err)) {
// @ts-expect-error -- private method for the time being
return clerk.__internal_navigateWithError('..', err.errors[0]);
return __internal_navigateWithError('..', err.errors[0]);
}
handleError(err, [], card.setError);
}
Expand Down