From f955308dbdcdd5df78d8225d93fccfd64ef65fa4 Mon Sep 17 00:00:00 2001 From: Chris Chinchilla Date: Tue, 20 Jan 2026 12:17:35 +1100 Subject: [PATCH] docs: Switch Expo quickstart to local storage (#41977) * Switch Expo quickstart to local storage * Update apps/docs/content/guides/getting-started/quickstarts/expo-react-native.mdx Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> * Update apps/docs/content/guides/getting-started/quickstarts/expo-react-native.mdx --------- Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> --- .../getting-started/quickstarts/expo-react-native.mdx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/apps/docs/content/guides/getting-started/quickstarts/expo-react-native.mdx b/apps/docs/content/guides/getting-started/quickstarts/expo-react-native.mdx index f4fd73b4cb6..35d1db45cc6 100644 --- a/apps/docs/content/guides/getting-started/quickstarts/expo-react-native.mdx +++ b/apps/docs/content/guides/getting-started/quickstarts/expo-react-native.mdx @@ -45,7 +45,7 @@ hideToc: true ```bash name=Terminal - cd my-app && npx expo install @supabase/supabase-js @react-native-async-storage/async-storage react-native-url-polyfill + cd my-app && npx expo install @supabase/supabase-js react-native-url-polyfill expo-sqlite ``` @@ -82,7 +82,7 @@ hideToc: true Create a helper file at `lib/supabase.ts` to initialize the Supabase client using the environment variables. - The code below uses [AsyncStorage](https://www.npmjs.com/package/@react-native-async-storage/async-storage) to persist the user session in your app. + The code below uses Expo's localStorage polyfill to persist authentication sessions. @@ -91,14 +91,14 @@ hideToc: true ```ts name=lib/supabase.ts import 'react-native-url-polyfill/auto' import { createClient } from '@supabase/supabase-js' - import AsyncStorage from '@react-native-async-storage/async-storage' + import 'expo-sqlite/localStorage/install'; const supabaseUrl = process.env.EXPO_PUBLIC_SUPABASE_URL const supabaseAnonKey = process.env.EXPO_PUBLIC_SUPABASE_PUBLISHABLE_KEY export const supabase = createClient(supabaseUrl, supabaseAnonKey, { auth: { - storage: AsyncStorage, + storage: localStorage, autoRefreshToken: true, persistSession: true, detectSessionInUrl: false,