@clerk/clerk-expo
2.20.0 · 4 Aug 2026MIT301.2k / weekRepositoryHomepagenpmAtom feed
1.2.9 is the newest release of 1.x.
In short
2 new1 fixed4 internal
Release note
Minor Changes
Introduce
getClerkInstance()to avoid importing the Clerk class from clerk-js manually.This enables developers to create and access a Clerk instance in their application outside of React.
import { ClerkProvider, getClerkInstance } from "@clerk/expo" const clerkInstance = getClerkInstance({ publishableKey: 'xxxx' }) // Always pass the `publishableKey` to `ClerkProvider` <ClerkProvider publishableKey={'xxxx'}> ... </ClerkProvider> // Somewhere in your code, outside of React you can do const token = await clerkInstance.session?.getToken(); fetch('http://example.com/', {headers: {Authorization: token })import { ClerkProvider, getClerkInstance } from "@clerk/expo" // Always pass the `publishableKey` to `ClerkProvider` <ClerkProvider publishableKey={'xxxx'}> ... </ClerkProvider> // If you sure that this code will run after the ClerkProvider has rendered then you can use `getClerkIntance` without options const token = await getClerkInstance().session?.getToken(); fetch('http://example.com/', {headers: {Authorization: token })Attention: If
getClerkInstanceis called without a publishable key, and ClerkProvider has not rendered yet, an error will be thrown
Patch Changes
Support
EXPO_PUBLIC_prefixes for env variables.## .env EXPO_PUBLIC_CLERK_PUBLISHABLE_KEY=xxxxxxxx
Set
@clerk/typesas a dependency for packages that had it as a dev dependency.
A whole project to check? Paste its package.json in the dependency check: every deprecated, outdated or vulnerable dependency, with what to upgrade to. Free, no account.