Skip to content

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

Merged
AlexNti merged 37 commits into
mainfrom
feat/expo-passkeys
Nov 6, 2024
Merged

feat(clerk-expo): Support expo passkeys#4352
AlexNti merged 37 commits into
mainfrom
feat/expo-passkeys

Conversation

@AlexNti

@AlexNti AlexNti commented Oct 17, 2024

Copy link
Copy Markdown
Contributor

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:

@changeset-bot

changeset-bot Bot commented Oct 17, 2024

Copy link
Copy Markdown

🦋 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

AlexNti commented Oct 18, 2024

Copy link
Copy Markdown
Contributor Author

!snapshot

@clerk-cookie

Copy link
Copy Markdown
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/astro@1.3.16-snapshot.v84a6da3 --save-exact

@clerk/backend

npm i @clerk/backend@1.14.1-snapshot.v84a6da3 --save-exact

@clerk/express

npm i @clerk/express@1.3.1-snapshot.v84a6da3 --save-exact

@clerk/fastify

npm i @clerk/fastify@2.0.3-snapshot.v84a6da3 --save-exact

@clerk/nextjs

npm i @clerk/nextjs@5.7.5-snapshot.v84a6da3 --save-exact

@clerk/remix

npm i @clerk/remix@4.2.39-snapshot.v84a6da3 --save-exact

@clerk/clerk-sdk-node

npm i @clerk/clerk-sdk-node@5.0.52-snapshot.v84a6da3 --save-exact

@clerk/tanstack-start

npm i @clerk/tanstack-start@0.4.15-snapshot.v84a6da3 --save-exact

@clerk/testing

npm i @clerk/testing@1.3.13-snapshot.v84a6da3 --save-exact

@anagstef

Copy link
Copy Markdown
Contributor

!snapshot

@clerk-cookie

Copy link
Copy Markdown
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/astro@1.3.16-snapshot.vd00b3bb --save-exact

@clerk/backend

npm i @clerk/backend@1.14.1-snapshot.vd00b3bb --save-exact

@clerk/chrome-extension

npm i @clerk/chrome-extension@1.3.21-snapshot.vd00b3bb --save-exact

@clerk/clerk-js

npm i @clerk/clerk-js@5.28.0-snapshot.vd00b3bb --save-exact

@clerk/elements

npm i @clerk/elements@0.16.3-snapshot.vd00b3bb --save-exact

@clerk/clerk-expo

npm i @clerk/clerk-expo@2.3.0-snapshot.vd00b3bb --save-exact

@clerk/express

npm i @clerk/express@1.3.1-snapshot.vd00b3bb --save-exact

@clerk/fastify

npm i @clerk/fastify@2.0.3-snapshot.vd00b3bb --save-exact

@clerk/localizations

npm i @clerk/localizations@3.3.1-snapshot.vd00b3bb --save-exact

@clerk/nextjs

npm i @clerk/nextjs@5.7.5-snapshot.vd00b3bb --save-exact

@clerk/clerk-react

npm i @clerk/clerk-react@5.12.1-snapshot.vd00b3bb --save-exact

@clerk/remix

npm i @clerk/remix@4.2.39-snapshot.vd00b3bb --save-exact

@clerk/clerk-sdk-node

npm i @clerk/clerk-sdk-node@5.0.52-snapshot.vd00b3bb --save-exact

@clerk/shared

npm i @clerk/shared@2.9.3-snapshot.vd00b3bb --save-exact

@clerk/tanstack-start

npm i @clerk/tanstack-start@0.4.15-snapshot.vd00b3bb --save-exact

@clerk/testing

npm i @clerk/testing@1.3.13-snapshot.vd00b3bb --save-exact

@clerk/themes

npm i @clerk/themes@2.1.38-snapshot.vd00b3bb --save-exact

@clerk/types

npm i @clerk/types@4.27.0-snapshot.vd00b3bb --save-exact

@AlexNti
AlexNti force-pushed the feat/expo-passkeys branch from d00b3bb to 5c7e219 Compare October 23, 2024 09:53
@AlexNti

AlexNti commented Oct 23, 2024

Copy link
Copy Markdown
Contributor Author

!snapshot

@clerk-cookie

Copy link
Copy Markdown
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/astro@1.4.1-snapshot.v1f5c4b4 --save-exact

@clerk/backend

npm i @clerk/backend@1.15.1-snapshot.v1f5c4b4 --save-exact

@clerk/chrome-extension

npm i @clerk/chrome-extension@1.3.22-snapshot.v1f5c4b4 --save-exact

@clerk/clerk-js

npm i @clerk/clerk-js@5.29.0-snapshot.v1f5c4b4 --save-exact

@clerk/elements

npm i @clerk/elements@0.17.1-snapshot.v1f5c4b4 --save-exact

@clerk/clerk-expo

npm i @clerk/clerk-expo@2.3.0-snapshot.v1f5c4b4 --save-exact

@clerk/express

npm i @clerk/express@1.3.3-snapshot.v1f5c4b4 --save-exact

@clerk/fastify

npm i @clerk/fastify@2.0.5-snapshot.v1f5c4b4 --save-exact

@clerk/localizations

npm i @clerk/localizations@3.3.2-snapshot.v1f5c4b4 --save-exact

@clerk/nextjs

npm i @clerk/nextjs@6.0.1-snapshot.v1f5c4b4 --save-exact

@clerk/clerk-react

npm i @clerk/clerk-react@5.13.1-snapshot.v1f5c4b4 --save-exact

@clerk/remix

npm i @clerk/remix@4.2.41-snapshot.v1f5c4b4 --save-exact

@clerk/clerk-sdk-node

npm i @clerk/clerk-sdk-node@5.0.54-snapshot.v1f5c4b4 --save-exact

@clerk/shared

npm i @clerk/shared@2.10.1-snapshot.v1f5c4b4 --save-exact

@clerk/tanstack-start

npm i @clerk/tanstack-start@0.4.17-snapshot.v1f5c4b4 --save-exact

@clerk/testing

npm i @clerk/testing@1.3.15-snapshot.v1f5c4b4 --save-exact

@clerk/themes

npm i @clerk/themes@2.1.39-snapshot.v1f5c4b4 --save-exact

@clerk/types

npm i @clerk/types@4.28.0-snapshot.v1f5c4b4 --save-exact

@AlexNti

AlexNti commented Oct 23, 2024

Copy link
Copy Markdown
Contributor Author

!snapshot

@clerk-cookie

Copy link
Copy Markdown
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/astro@1.4.1-snapshot.va96a299 --save-exact

@clerk/backend

npm i @clerk/backend@1.15.1-snapshot.va96a299 --save-exact

@clerk/chrome-extension

npm i @clerk/chrome-extension@1.3.22-snapshot.va96a299 --save-exact

@clerk/clerk-js

npm i @clerk/clerk-js@5.29.0-snapshot.va96a299 --save-exact

@clerk/elements

npm i @clerk/elements@0.17.1-snapshot.va96a299 --save-exact

@clerk/clerk-expo

npm i @clerk/clerk-expo@2.3.0-snapshot.va96a299 --save-exact

@clerk/express

npm i @clerk/express@1.3.3-snapshot.va96a299 --save-exact

@clerk/fastify

npm i @clerk/fastify@2.0.5-snapshot.va96a299 --save-exact

@clerk/localizations

npm i @clerk/localizations@3.3.2-snapshot.va96a299 --save-exact

@clerk/nextjs

npm i @clerk/nextjs@6.0.1-snapshot.va96a299 --save-exact

@clerk/clerk-react

npm i @clerk/clerk-react@5.13.1-snapshot.va96a299 --save-exact

@clerk/remix

npm i @clerk/remix@4.2.41-snapshot.va96a299 --save-exact

@clerk/clerk-sdk-node

npm i @clerk/clerk-sdk-node@5.0.54-snapshot.va96a299 --save-exact

@clerk/shared

npm i @clerk/shared@2.10.1-snapshot.va96a299 --save-exact

@clerk/tanstack-start

npm i @clerk/tanstack-start@0.4.17-snapshot.va96a299 --save-exact

@clerk/testing

npm i @clerk/testing@1.3.15-snapshot.va96a299 --save-exact

@clerk/themes

npm i @clerk/themes@2.1.39-snapshot.va96a299 --save-exact

@clerk/types

npm i @clerk/types@4.28.0-snapshot.va96a299 --save-exact

@AlexNti

AlexNti commented Oct 23, 2024

Copy link
Copy Markdown
Contributor Author

!snapshot

1 similar comment
@AlexNti

AlexNti commented Oct 23, 2024

Copy link
Copy Markdown
Contributor Author

!snapshot

@clerk-cookie

Copy link
Copy Markdown
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/astro@1.4.1-snapshot.vb92f3ea --save-exact

@clerk/backend

npm i @clerk/backend@1.15.1-snapshot.vb92f3ea --save-exact

@clerk/chrome-extension

npm i @clerk/chrome-extension@1.3.22-snapshot.vb92f3ea --save-exact

@clerk/clerk-js

npm i @clerk/clerk-js@5.29.0-snapshot.vb92f3ea --save-exact

@clerk/elements

npm i @clerk/elements@0.17.1-snapshot.vb92f3ea --save-exact

@clerk/clerk-expo

npm i @clerk/clerk-expo@2.3.0-snapshot.vb92f3ea --save-exact

@clerk/express

npm i @clerk/express@1.3.3-snapshot.vb92f3ea --save-exact

@clerk/fastify

npm i @clerk/fastify@2.0.5-snapshot.vb92f3ea --save-exact

@clerk/localizations

npm i @clerk/localizations@3.3.2-snapshot.vb92f3ea --save-exact

@clerk/nextjs

npm i @clerk/nextjs@6.0.1-snapshot.vb92f3ea --save-exact

@clerk/clerk-react

npm i @clerk/clerk-react@5.13.1-snapshot.vb92f3ea --save-exact

@clerk/remix

npm i @clerk/remix@4.2.41-snapshot.vb92f3ea --save-exact

@clerk/clerk-sdk-node

npm i @clerk/clerk-sdk-node@5.0.54-snapshot.vb92f3ea --save-exact

@clerk/shared

npm i @clerk/shared@2.10.1-snapshot.vb92f3ea --save-exact

@clerk/tanstack-start

npm i @clerk/tanstack-start@0.4.17-snapshot.vb92f3ea --save-exact

@clerk/testing

npm i @clerk/testing@1.3.15-snapshot.vb92f3ea --save-exact

@clerk/themes

npm i @clerk/themes@2.1.39-snapshot.vb92f3ea --save-exact

@clerk/types

npm i @clerk/types@4.28.0-snapshot.vb92f3ea --save-exact

@AlexNti

AlexNti commented Oct 23, 2024

Copy link
Copy Markdown
Contributor Author

!snapshot

@clerk-cookie

Copy link
Copy Markdown
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/astro@1.4.1-snapshot.vaa1630d --save-exact

@clerk/backend

npm i @clerk/backend@1.15.1-snapshot.vaa1630d --save-exact

@clerk/chrome-extension

npm i @clerk/chrome-extension@1.3.22-snapshot.vaa1630d --save-exact

@clerk/clerk-js

npm i @clerk/clerk-js@5.29.0-snapshot.vaa1630d --save-exact

@clerk/elements

npm i @clerk/elements@0.17.1-snapshot.vaa1630d --save-exact

@clerk/clerk-expo

npm i @clerk/clerk-expo@2.3.0-snapshot.vaa1630d --save-exact

@clerk/express

npm i @clerk/express@1.3.3-snapshot.vaa1630d --save-exact

@clerk/fastify

npm i @clerk/fastify@2.0.5-snapshot.vaa1630d --save-exact

@clerk/localizations

npm i @clerk/localizations@3.3.2-snapshot.vaa1630d --save-exact

@clerk/nextjs

npm i @clerk/nextjs@6.0.1-snapshot.vaa1630d --save-exact

@clerk/clerk-react

npm i @clerk/clerk-react@5.13.1-snapshot.vaa1630d --save-exact

@clerk/remix

npm i @clerk/remix@4.2.41-snapshot.vaa1630d --save-exact

@clerk/clerk-sdk-node

npm i @clerk/clerk-sdk-node@5.0.54-snapshot.vaa1630d --save-exact

@clerk/shared

npm i @clerk/shared@2.10.1-snapshot.vaa1630d --save-exact

@clerk/tanstack-start

npm i @clerk/tanstack-start@0.4.17-snapshot.vaa1630d --save-exact

@clerk/testing

npm i @clerk/testing@1.3.15-snapshot.vaa1630d --save-exact

@clerk/themes

npm i @clerk/themes@2.1.39-snapshot.vaa1630d --save-exact

@clerk/types

npm i @clerk/types@4.28.0-snapshot.vaa1630d --save-exact

@AlexNti
AlexNti force-pushed the feat/expo-passkeys branch from aa1630d to 1b742a8 Compare October 24, 2024 07:22
@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 force-pushed the feat/expo-passkeys branch from 38d4563 to 29e9dcc Compare November 6, 2024 14:48
@AlexNti
AlexNti merged commit e199037 into main Nov 6, 2024
@AlexNti
AlexNti deleted the feat/expo-passkeys branch November 6, 2024 15:50
wobsoriano pushed a commit that referenced this pull request Feb 8, 2025
Co-authored-by: Stefanos Anagnostou <anagstef@users.noreply.github.com>
Co-authored-by: Stefanos Anagnostou <stefanos@clerk.dev>
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