Repository navigation
feat(clerk-expo): Improved offline support for Expo - #4604
Conversation
🦋 Changeset detectedLatest commit: 4901cdc The changes in this PR will be included in the next version bump. This PR includes changesets to release 23 packages
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 |
|
!snapshot |
b45c540 to
3082f30
Compare
|
!snapshot |
|
Hey @anagstef - the snapshot version command generated the following package versions:
Tip: Use the snippet copy button below to quickly install the required packages. npm i @clerk/astro@1.4.14-snapshot.v20241119154041 --save-exact
npm i @clerk/backend@1.17.1-snapshot.v20241119154041 --save-exact
npm i @clerk/chrome-extension@1.3.38-snapshot.v20241119154041 --save-exact
npm i @clerk/clerk-js@5.34.4-snapshot.v20241119154041 --save-exact
npm i @clerk/elements@0.19.5-snapshot.v20241119154041 --save-exact
npm i @clerk/clerk-expo@2.3.7-snapshot.v20241119154041 --save-exact
npm i @clerk/expo-passkeys@0.0.7-snapshot.v20241119154041 --save-exact
npm i @clerk/express@1.3.16-snapshot.v20241119154041 --save-exact
npm i @clerk/fastify@2.0.18-snapshot.v20241119154041 --save-exact
npm i @clerk/localizations@3.6.5-snapshot.v20241119154041 --save-exact
npm i @clerk/nextjs@6.4.1-snapshot.v20241119154041 --save-exact
npm i @clerk/nuxt@0.0.2-snapshot.v20241119154041 --save-exact
npm i @clerk/clerk-react@5.16.1-snapshot.v20241119154041 --save-exact
npm i @clerk/remix@4.2.54-snapshot.v20241119154041 --save-exact
npm i @clerk/clerk-sdk-node@5.0.67-snapshot.v20241119154041 --save-exact
npm i @clerk/shared@2.15.1-snapshot.v20241119154041 --save-exact
npm i @clerk/tanstack-start@0.5.1-snapshot.v20241119154041 --save-exact
npm i @clerk/testing@1.3.28-snapshot.v20241119154041 --save-exact
npm i @clerk/themes@2.1.46-snapshot.v20241119154041 --save-exact
npm i @clerk/types@4.34.1-snapshot.v20241119154041 --save-exact
npm i @clerk/ui@0.1.22-snapshot.v20241119154041 --save-exact
npm i @clerk/vue@0.0.6-snapshot.v20241119154041 --save-exact |
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
99c1caf to
d83a803
Compare
|
!snapshot |
|
Hey @anagstef - the snapshot version command generated the following package versions:
Tip: Use the snippet copy button below to quickly install the required packages. npm i @clerk/astro@1.4.15-snapshot.v20241122141417 --save-exact
npm i @clerk/backend@1.17.2-snapshot.v20241122141417 --save-exact
npm i @clerk/chrome-extension@1.3.40-snapshot.v20241122141417 --save-exact
npm i @clerk/clerk-js@5.34.6-snapshot.v20241122141417 --save-exact
npm i @clerk/elements@0.19.6-snapshot.v20241122141417 --save-exact
npm i @clerk/clerk-expo@2.3.9-snapshot.v20241122141417 --save-exact
npm i @clerk/expo-passkeys@0.0.8-snapshot.v20241122141417 --save-exact
npm i @clerk/express@1.3.17-snapshot.v20241122141417 --save-exact
npm i @clerk/fastify@2.0.19-snapshot.v20241122141417 --save-exact
npm i @clerk/localizations@3.6.6-snapshot.v20241122141417 --save-exact
npm i @clerk/nextjs@6.4.2-snapshot.v20241122141417 --save-exact
npm i @clerk/nuxt@0.0.3-snapshot.v20241122141417 --save-exact
npm i @clerk/clerk-react@5.16.2-snapshot.v20241122141417 --save-exact
npm i @clerk/remix@4.2.55-snapshot.v20241122141417 --save-exact
npm i @clerk/clerk-sdk-node@5.0.68-snapshot.v20241122141417 --save-exact
npm i @clerk/shared@2.16.1-snapshot.v20241122141417 --save-exact
npm i @clerk/tanstack-start@0.5.2-snapshot.v20241122141417 --save-exact
npm i @clerk/testing@1.3.29-snapshot.v20241122141417 --save-exact
npm i @clerk/themes@2.1.47-snapshot.v20241122141417 --save-exact
npm i @clerk/types@4.34.2-snapshot.v20241122141417 --save-exact
npm i @clerk/ui@0.1.23-snapshot.v20241122141417 --save-exact
npm i @clerk/vue@0.0.7-snapshot.v20241122141417 --save-exact |
…ew `toJSON` methods
Description
We're introducing improved offline support for the
@clerk/clerk-expopackage to enhance reliability and user experience. This new improvement allows apps to bootstrap without an internet connection by using cached Clerk resources, ensuring quick initialization.It solves issues such as the following:
isLoadedproperty and theClerkLoadedcomponent, with only a single network fetch attempt, and if it fails, it falls back to the cached resources.getTokenfunction ofuseAuthhook now returns a cached token if network errors occur.How to use it:
Install the
expo-secure-storepackage in your project by running:Use
import { secureStore } from "@clerk/clerk-expo/secure-store"to import our implementation of theSecureStoreAPI.Pass the
secureStorein the__experimental_resourceCacheproperty of theClerkProviderto enable offline support.relates to #3563
Checklist
pnpm testruns as expected.pnpm buildruns as expected.Type of change