Packages

@clerk/clerk-expo

2.20.0 · 4 Aug 2026MIT301.2k / weekRepositoryHomepagenpmAtom feed

Deprecated by its maintainers: @clerk/clerk-expo is deprecated. Migrate to @clerk/expo by following the Core 3 upgrade guide https://clerk.com/docs/guides/development/upgrading/upgrade-guides/core-3What to use instead
Your version

1.2.0

5 Jun 2024Where it was published

1.2.9 is the newest release of 1.x.

npm marks 1.2.0 as deprecated: @clerk/clerk-expo is deprecated. Migrate to @clerk/expo by following the Core 3 upgrade guide clerk.com/docs/guides/development/upgrading/upg…

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 getClerkInstance is 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/types as 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.