Skip to content
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

feat(clerk-js,localizations,types): Support passkeys for first factor re-verification #5242

Merged
merged 9 commits into from
Mar 11, 2025

Conversation

octoper
Copy link
Member

@octoper octoper commented Feb 27, 2025

Description

This PR introduces passkeys as a first factor strategy for re-verification

Checklist

  • pnpm test runs as expected.
  • pnpm build runs as expected.
  • (If applicable) JSDoc comments have been added or updated for any package exports
  • (If applicable) Documentation has been updated

Type of change

  • 🐛 Bug fix
  • 🌟 New feature
  • 🔨 Breaking change
  • 📖 Refactoring / dependency upgrade / documentation
  • other:

Copy link

changeset-bot bot commented Feb 27, 2025

🦋 Changeset detected

Latest commit: d70b949

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 22 packages
Name Type
@clerk/clerk-js Minor
@clerk/localizations Minor
@clerk/types Minor
@clerk/chrome-extension Patch
@clerk/clerk-expo Patch
@clerk/clerk-react Patch
@clerk/agent-toolkit Patch
@clerk/astro Patch
@clerk/backend Patch
@clerk/elements Patch
@clerk/expo-passkeys Patch
@clerk/express Patch
@clerk/fastify Patch
@clerk/nextjs Patch
@clerk/nuxt Patch
@clerk/react-router Patch
@clerk/remix Patch
@clerk/shared Patch
@clerk/tanstack-start Patch
@clerk/testing Patch
@clerk/themes Patch
@clerk/vue Patch

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

Copy link

vercel bot commented Feb 27, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
clerk-js-sandbox ✅ Ready (Inspect) Visit Preview 💬 Add feedback Mar 11, 2025 2:00pm

Copy link
Member

@chanioxaris chanioxaris left a comment

Choose a reason for hiding this comment

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

💯 🥳

Comment on lines 211 to 216
if (!nonce) {
// Throw an error if the nonce is not present
throw new ClerkWebAuthnError('Passkeys are not supported', {
code: 'passkey_not_supported',
});
}
Copy link
Member

Choose a reason for hiding this comment

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

I think this needs to be an assertion similar to clerkMissingWebAuthnPublicKeyOptions('get'). Actually you can skip this because you are checcking bellow for

  const publicKeyOptions = nonce ? convertJSONToPublicKeyRequestOptions(JSON.parse(nonce)) : null;

    if (!publicKeyOptions) {
      clerkMissingWebAuthnPublicKeyOptions('get');
    }

Co-authored-by: panteliselef <panteliselef@outlook.com>
@octoper octoper changed the title feat(clerk-js,localization,types): Support passkeys for first factor re-verification feat(clerk-js,localizations,types): Support passkeys for first factor re-verification Mar 11, 2025
@octoper octoper enabled auto-merge (squash) March 11, 2025 14:03
@nikosdouvlis nikosdouvlis disabled auto-merge March 11, 2025 14:07
@nikosdouvlis nikosdouvlis merged commit 3c225d9 into main Mar 11, 2025
31 of 34 checks passed
@nikosdouvlis nikosdouvlis deleted the vaggelis/user-227-support-passkeys branch March 11, 2025 14:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants