clerk-cookie
released this
08 Nov 20:30
·
224 commits
to main
since this release
Minor Changes
-
Introduce experimental support for passkeys in Expo (iOS, Android, and Web). (#4352) by @AlexNti
To use passkeys in Expo projects, pass the
__experimental_passkeys
object, which can be imported from@clerk/clerk-expo/passkeys
, to theClerkProvider
component:import { ClerkProvider } from '@clerk/clerk-expo'; import { passkeys } from '@clerk/clerk-expo/passkeys'; <ClerkProvider __experimental_passkeys={passkeys}>{/* Your app here */}</ClerkProvider>;
The API for using passkeys in Expo projects is the same as the one used in web apps:
// passkey creation const { user } = useUser(); const handleCreatePasskey = async () => { if (!user) return; try { return await user.createPasskey(); } catch (e: any) { // handle error } }; // passkey authentication const { signIn, setActive } = useSignIn(); const handlePasskeySignIn = async () => { try { const signInResponse = await signIn.authenticateWithPasskey(); await setActive({ session: signInResponse.createdSessionId }); } catch (err: any) { //handle error } };
Patch Changes
- Updated dependencies [
5a21de1f46df3642828dc27e4862263c9858da2b
,f7472e22877f62fc7f3c8d3efe409ff2276fb4a3
,e199037b8f484abdeeb9fc24455a1b4b8c31c8dd
,e25381dfa358c0f7f8082a67936e4ee4a97c73f1
,886e294a8d8c54b39cd5bda88d46b89eace3861e
,0e443ad7c76643420b50e5b169193e03f6ef79f9
,cc24c8145f1eea7fb91550f2c3e0bac3993e4320
,e91a2bd77e2ab985d22724f19ab220c8270fdd10
]:- @clerk/[email protected]
- @clerk/[email protected]
- @clerk/[email protected]
- @clerk/[email protected]