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-expo): Support expo passkeys #4352

Merged
merged 37 commits into from
Nov 6, 2024
Merged

feat(clerk-expo): Support expo passkeys #4352

merged 37 commits into from
Nov 6, 2024

Conversation

AlexNti
Copy link
Member

@AlexNti AlexNti commented Oct 17, 2024

Description

🔐 This PR introduces passkey support for Expo iOS, Android, and Web. 🚀

🛠 Usage

To enable passkeys in your Expo project, update your ClerkProvider as follows:

import { ClerkProvider } from '@clerk/clerk-expo';
import { passkeys } from '@clerk/clerk-expo/passkeys';

<ClerkProvider __experimental__passkeys={passkeys}>
  {/* Your app here */}
</ClerkProvider>

🔑 Creating a Passkey

const { user } = useUser();

const handleCreatePasskey = async () => {
  if (!user) return;
  try {
    return await user.createPasskey();
  } catch (e: any) {
    // handle error
  }
};

🔓 Authenticating with a Passkey

const { signIn, setActive } = useSignIn();

const handlePasskeySignIn = async () => {
  try {
    const signInResponse = await signIn.authenticateWithPasskey();
    await setActive({ session: signInResponse.createdSessionId });
  } catch (err: any) {
    // handle error
  }
};

Checklist

  • npm test runs as expected.
  • npm run 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 Oct 17, 2024

🦋 Changeset detected

Latest commit: 29e9dcc

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

This PR includes changesets to release 20 packages
Name Type
@clerk/clerk-js Minor
@clerk/shared Minor
@clerk/types Minor
@clerk/clerk-expo Minor
@clerk/expo-passkeys Patch
@clerk/chrome-extension Patch
@clerk/astro Patch
@clerk/backend Patch
@clerk/elements Patch
@clerk/express Patch
@clerk/fastify Patch
@clerk/nextjs Patch
@clerk/clerk-react Patch
@clerk/remix Patch
@clerk/clerk-sdk-node Patch
@clerk/tanstack-start Patch
@clerk/testing Patch
@clerk/ui Patch
@clerk/localizations Patch
@clerk/themes 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

@AlexNti
Copy link
Member Author

AlexNti commented Oct 18, 2024

!snapshot

@clerk-cookie
Copy link
Collaborator

Hey @AlexNti - the snapshot version command generated the following package versions:

Package Version
@clerk/astro 1.3.16-snapshot.v84a6da3
@clerk/backend 1.14.1-snapshot.v84a6da3
@clerk/express 1.3.1-snapshot.v84a6da3
@clerk/fastify 2.0.3-snapshot.v84a6da3
@clerk/nextjs 5.7.5-snapshot.v84a6da3
@clerk/remix 4.2.39-snapshot.v84a6da3
@clerk/clerk-sdk-node 5.0.52-snapshot.v84a6da3
@clerk/tanstack-start 0.4.15-snapshot.v84a6da3
@clerk/testing 1.3.13-snapshot.v84a6da3

Tip: Use the snippet copy button below to quickly install the required packages.
@clerk/astro

npm i @clerk/[email protected] --save-exact

@clerk/backend

npm i @clerk/[email protected] --save-exact

@clerk/express

npm i @clerk/[email protected] --save-exact

@clerk/fastify

npm i @clerk/[email protected] --save-exact

@clerk/nextjs

npm i @clerk/[email protected] --save-exact

@clerk/remix

npm i @clerk/[email protected] --save-exact

@clerk/clerk-sdk-node

npm i @clerk/[email protected] --save-exact

@clerk/tanstack-start

npm i @clerk/[email protected] --save-exact

@clerk/testing

npm i @clerk/[email protected] --save-exact

@anagstef
Copy link
Member

!snapshot

@clerk-cookie
Copy link
Collaborator

Hey @anagstef - the snapshot version command generated the following package versions:

Package Version
@clerk/astro 1.3.16-snapshot.vd00b3bb
@clerk/backend 1.14.1-snapshot.vd00b3bb
@clerk/chrome-extension 1.3.21-snapshot.vd00b3bb
@clerk/clerk-js 5.28.0-snapshot.vd00b3bb
@clerk/elements 0.16.3-snapshot.vd00b3bb
@clerk/clerk-expo 2.3.0-snapshot.vd00b3bb
@clerk/express 1.3.1-snapshot.vd00b3bb
@clerk/fastify 2.0.3-snapshot.vd00b3bb
@clerk/localizations 3.3.1-snapshot.vd00b3bb
@clerk/nextjs 5.7.5-snapshot.vd00b3bb
@clerk/clerk-react 5.12.1-snapshot.vd00b3bb
@clerk/remix 4.2.39-snapshot.vd00b3bb
@clerk/clerk-sdk-node 5.0.52-snapshot.vd00b3bb
@clerk/shared 2.9.3-snapshot.vd00b3bb
@clerk/tanstack-start 0.4.15-snapshot.vd00b3bb
@clerk/testing 1.3.13-snapshot.vd00b3bb
@clerk/themes 2.1.38-snapshot.vd00b3bb
@clerk/types 4.27.0-snapshot.vd00b3bb

Tip: Use the snippet copy button below to quickly install the required packages.
@clerk/astro

npm i @clerk/[email protected] --save-exact

@clerk/backend

npm i @clerk/[email protected] --save-exact

@clerk/chrome-extension

npm i @clerk/[email protected] --save-exact

@clerk/clerk-js

npm i @clerk/[email protected] --save-exact

@clerk/elements

npm i @clerk/[email protected] --save-exact

@clerk/clerk-expo

npm i @clerk/[email protected] --save-exact

@clerk/express

npm i @clerk/[email protected] --save-exact

@clerk/fastify

npm i @clerk/[email protected] --save-exact

@clerk/localizations

npm i @clerk/[email protected] --save-exact

@clerk/nextjs

npm i @clerk/[email protected] --save-exact

@clerk/clerk-react

npm i @clerk/[email protected] --save-exact

@clerk/remix

npm i @clerk/[email protected] --save-exact

@clerk/clerk-sdk-node

npm i @clerk/[email protected] --save-exact

@clerk/shared

npm i @clerk/[email protected] --save-exact

@clerk/tanstack-start

npm i @clerk/[email protected] --save-exact

@clerk/testing

npm i @clerk/[email protected] --save-exact

@clerk/themes

npm i @clerk/[email protected] --save-exact

@clerk/types

npm i @clerk/[email protected] --save-exact

@AlexNti
Copy link
Member Author

AlexNti commented Oct 23, 2024

!snapshot

@clerk-cookie
Copy link
Collaborator

Hey @AlexNti - the snapshot version command generated the following package versions:

Package Version
@clerk/astro 1.4.1-snapshot.v1f5c4b4
@clerk/backend 1.15.1-snapshot.v1f5c4b4
@clerk/chrome-extension 1.3.22-snapshot.v1f5c4b4
@clerk/clerk-js 5.29.0-snapshot.v1f5c4b4
@clerk/elements 0.17.1-snapshot.v1f5c4b4
@clerk/clerk-expo 2.3.0-snapshot.v1f5c4b4
@clerk/express 1.3.3-snapshot.v1f5c4b4
@clerk/fastify 2.0.5-snapshot.v1f5c4b4
@clerk/localizations 3.3.2-snapshot.v1f5c4b4
@clerk/nextjs 6.0.1-snapshot.v1f5c4b4
@clerk/clerk-react 5.13.1-snapshot.v1f5c4b4
@clerk/remix 4.2.41-snapshot.v1f5c4b4
@clerk/clerk-sdk-node 5.0.54-snapshot.v1f5c4b4
@clerk/shared 2.10.1-snapshot.v1f5c4b4
@clerk/tanstack-start 0.4.17-snapshot.v1f5c4b4
@clerk/testing 1.3.15-snapshot.v1f5c4b4
@clerk/themes 2.1.39-snapshot.v1f5c4b4
@clerk/types 4.28.0-snapshot.v1f5c4b4

Tip: Use the snippet copy button below to quickly install the required packages.
@clerk/astro

npm i @clerk/[email protected] --save-exact

@clerk/backend

npm i @clerk/[email protected] --save-exact

@clerk/chrome-extension

npm i @clerk/[email protected] --save-exact

@clerk/clerk-js

npm i @clerk/[email protected] --save-exact

@clerk/elements

npm i @clerk/[email protected] --save-exact

@clerk/clerk-expo

npm i @clerk/[email protected] --save-exact

@clerk/express

npm i @clerk/[email protected] --save-exact

@clerk/fastify

npm i @clerk/[email protected] --save-exact

@clerk/localizations

npm i @clerk/[email protected] --save-exact

@clerk/nextjs

npm i @clerk/[email protected] --save-exact

@clerk/clerk-react

npm i @clerk/[email protected] --save-exact

@clerk/remix

npm i @clerk/[email protected] --save-exact

@clerk/clerk-sdk-node

npm i @clerk/[email protected] --save-exact

@clerk/shared

npm i @clerk/[email protected] --save-exact

@clerk/tanstack-start

npm i @clerk/[email protected] --save-exact

@clerk/testing

npm i @clerk/[email protected] --save-exact

@clerk/themes

npm i @clerk/[email protected] --save-exact

@clerk/types

npm i @clerk/[email protected] --save-exact

@AlexNti
Copy link
Member Author

AlexNti commented Oct 23, 2024

!snapshot

@clerk-cookie
Copy link
Collaborator

Hey @AlexNti - the snapshot version command generated the following package versions:

Package Version
@clerk/astro 1.4.1-snapshot.va96a299
@clerk/backend 1.15.1-snapshot.va96a299
@clerk/chrome-extension 1.3.22-snapshot.va96a299
@clerk/clerk-js 5.29.0-snapshot.va96a299
@clerk/elements 0.17.1-snapshot.va96a299
@clerk/clerk-expo 2.3.0-snapshot.va96a299
@clerk/express 1.3.3-snapshot.va96a299
@clerk/fastify 2.0.5-snapshot.va96a299
@clerk/localizations 3.3.2-snapshot.va96a299
@clerk/nextjs 6.0.1-snapshot.va96a299
@clerk/clerk-react 5.13.1-snapshot.va96a299
@clerk/remix 4.2.41-snapshot.va96a299
@clerk/clerk-sdk-node 5.0.54-snapshot.va96a299
@clerk/shared 2.10.1-snapshot.va96a299
@clerk/tanstack-start 0.4.17-snapshot.va96a299
@clerk/testing 1.3.15-snapshot.va96a299
@clerk/themes 2.1.39-snapshot.va96a299
@clerk/types 4.28.0-snapshot.va96a299

Tip: Use the snippet copy button below to quickly install the required packages.
@clerk/astro

npm i @clerk/[email protected] --save-exact

@clerk/backend

npm i @clerk/[email protected] --save-exact

@clerk/chrome-extension

npm i @clerk/[email protected] --save-exact

@clerk/clerk-js

npm i @clerk/[email protected] --save-exact

@clerk/elements

npm i @clerk/[email protected] --save-exact

@clerk/clerk-expo

npm i @clerk/[email protected] --save-exact

@clerk/express

npm i @clerk/[email protected] --save-exact

@clerk/fastify

npm i @clerk/[email protected] --save-exact

@clerk/localizations

npm i @clerk/[email protected] --save-exact

@clerk/nextjs

npm i @clerk/[email protected] --save-exact

@clerk/clerk-react

npm i @clerk/[email protected] --save-exact

@clerk/remix

npm i @clerk/[email protected] --save-exact

@clerk/clerk-sdk-node

npm i @clerk/[email protected] --save-exact

@clerk/shared

npm i @clerk/[email protected] --save-exact

@clerk/tanstack-start

npm i @clerk/[email protected] --save-exact

@clerk/testing

npm i @clerk/[email protected] --save-exact

@clerk/themes

npm i @clerk/[email protected] --save-exact

@clerk/types

npm i @clerk/[email protected] --save-exact

@AlexNti
Copy link
Member Author

AlexNti commented Oct 23, 2024

!snapshot

1 similar comment
@AlexNti
Copy link
Member Author

AlexNti commented Oct 23, 2024

!snapshot

@clerk-cookie
Copy link
Collaborator

Hey @AlexNti - the snapshot version command generated the following package versions:

Package Version
@clerk/astro 1.4.1-snapshot.vb92f3ea
@clerk/backend 1.15.1-snapshot.vb92f3ea
@clerk/chrome-extension 1.3.22-snapshot.vb92f3ea
@clerk/clerk-js 5.29.0-snapshot.vb92f3ea
@clerk/elements 0.17.1-snapshot.vb92f3ea
@clerk/clerk-expo 2.3.0-snapshot.vb92f3ea
@clerk/express 1.3.3-snapshot.vb92f3ea
@clerk/fastify 2.0.5-snapshot.vb92f3ea
@clerk/localizations 3.3.2-snapshot.vb92f3ea
@clerk/nextjs 6.0.1-snapshot.vb92f3ea
@clerk/clerk-react 5.13.1-snapshot.vb92f3ea
@clerk/remix 4.2.41-snapshot.vb92f3ea
@clerk/clerk-sdk-node 5.0.54-snapshot.vb92f3ea
@clerk/shared 2.10.1-snapshot.vb92f3ea
@clerk/tanstack-start 0.4.17-snapshot.vb92f3ea
@clerk/testing 1.3.15-snapshot.vb92f3ea
@clerk/themes 2.1.39-snapshot.vb92f3ea
@clerk/types 4.28.0-snapshot.vb92f3ea

Tip: Use the snippet copy button below to quickly install the required packages.
@clerk/astro

npm i @clerk/[email protected] --save-exact

@clerk/backend

npm i @clerk/[email protected] --save-exact

@clerk/chrome-extension

npm i @clerk/[email protected] --save-exact

@clerk/clerk-js

npm i @clerk/[email protected] --save-exact

@clerk/elements

npm i @clerk/[email protected] --save-exact

@clerk/clerk-expo

npm i @clerk/[email protected] --save-exact

@clerk/express

npm i @clerk/[email protected] --save-exact

@clerk/fastify

npm i @clerk/[email protected] --save-exact

@clerk/localizations

npm i @clerk/[email protected] --save-exact

@clerk/nextjs

npm i @clerk/[email protected] --save-exact

@clerk/clerk-react

npm i @clerk/[email protected] --save-exact

@clerk/remix

npm i @clerk/[email protected] --save-exact

@clerk/clerk-sdk-node

npm i @clerk/[email protected] --save-exact

@clerk/shared

npm i @clerk/[email protected] --save-exact

@clerk/tanstack-start

npm i @clerk/[email protected] --save-exact

@clerk/testing

npm i @clerk/[email protected] --save-exact

@clerk/themes

npm i @clerk/[email protected] --save-exact

@clerk/types

npm i @clerk/[email protected] --save-exact

@AlexNti
Copy link
Member Author

AlexNti commented Oct 23, 2024

!snapshot

@clerk-cookie
Copy link
Collaborator

Hey @AlexNti - the snapshot version command generated the following package versions:

Package Version
@clerk/astro 1.4.1-snapshot.vaa1630d
@clerk/backend 1.15.1-snapshot.vaa1630d
@clerk/chrome-extension 1.3.22-snapshot.vaa1630d
@clerk/clerk-js 5.29.0-snapshot.vaa1630d
@clerk/elements 0.17.1-snapshot.vaa1630d
@clerk/clerk-expo 2.3.0-snapshot.vaa1630d
@clerk/express 1.3.3-snapshot.vaa1630d
@clerk/fastify 2.0.5-snapshot.vaa1630d
@clerk/localizations 3.3.2-snapshot.vaa1630d
@clerk/nextjs 6.0.1-snapshot.vaa1630d
@clerk/clerk-react 5.13.1-snapshot.vaa1630d
@clerk/remix 4.2.41-snapshot.vaa1630d
@clerk/clerk-sdk-node 5.0.54-snapshot.vaa1630d
@clerk/shared 2.10.1-snapshot.vaa1630d
@clerk/tanstack-start 0.4.17-snapshot.vaa1630d
@clerk/testing 1.3.15-snapshot.vaa1630d
@clerk/themes 2.1.39-snapshot.vaa1630d
@clerk/types 4.28.0-snapshot.vaa1630d

Tip: Use the snippet copy button below to quickly install the required packages.
@clerk/astro

npm i @clerk/[email protected] --save-exact

@clerk/backend

npm i @clerk/[email protected] --save-exact

@clerk/chrome-extension

npm i @clerk/[email protected] --save-exact

@clerk/clerk-js

npm i @clerk/[email protected] --save-exact

@clerk/elements

npm i @clerk/[email protected] --save-exact

@clerk/clerk-expo

npm i @clerk/[email protected] --save-exact

@clerk/express

npm i @clerk/[email protected] --save-exact

@clerk/fastify

npm i @clerk/[email protected] --save-exact

@clerk/localizations

npm i @clerk/[email protected] --save-exact

@clerk/nextjs

npm i @clerk/[email protected] --save-exact

@clerk/clerk-react

npm i @clerk/[email protected] --save-exact

@clerk/remix

npm i @clerk/[email protected] --save-exact

@clerk/clerk-sdk-node

npm i @clerk/[email protected] --save-exact

@clerk/shared

npm i @clerk/[email protected] --save-exact

@clerk/tanstack-start

npm i @clerk/[email protected] --save-exact

@clerk/testing

npm i @clerk/[email protected] --save-exact

@clerk/themes

npm i @clerk/[email protected] --save-exact

@clerk/types

npm i @clerk/[email protected] --save-exact

@AlexNti AlexNti marked this pull request as ready for review October 24, 2024 08:24
@AlexNti AlexNti changed the title Feat/expo passkeys [WIP] Feat/expo passkeys Oct 24, 2024
@AlexNti AlexNti changed the title Feat/expo passkeys feat(expo): Support expo passkey Oct 24, 2024
@AlexNti AlexNti changed the title feat(expo): Support expo passkey feat(expo): Support expo passkeys Oct 24, 2024
@AlexNti AlexNti changed the title feat(expo): Support expo passkeys feat(clerk-expo): Support expo passkeys Oct 24, 2024
@AlexNti AlexNti merged commit e199037 into main Nov 6, 2024
23 checks passed
@AlexNti AlexNti deleted the feat/expo-passkeys branch November 6, 2024 15:50
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.

3 participants