diff --git a/src/SupabaseClient.ts b/src/SupabaseClient.ts index 1a0bb0ff8..1590f631a 100644 --- a/src/SupabaseClient.ts +++ b/src/SupabaseClient.ts @@ -316,6 +316,7 @@ export default class SupabaseClient< persistSession, detectSessionInUrl, storage, + userStorage, storageKey, flowType, lock, @@ -336,6 +337,7 @@ export default class SupabaseClient< persistSession, detectSessionInUrl, storage, + userStorage, flowType, lock, debug, diff --git a/src/lib/types.ts b/src/lib/types.ts index eaafd889c..d46006317 100644 --- a/src/lib/types.ts +++ b/src/lib/types.ts @@ -38,6 +38,14 @@ export type SupabaseClientOptions = { * A storage provider. Used to store the logged-in session. */ storage?: SupabaseAuthClientOptions['storage'] + /** + * A storage provider to store the user profile separately from the session. + * Useful when you need to store the session information in cookies, + * without bloating the data with the redundant user object. + * + * @experimental + */ + userStorage?: SupabaseAuthClientOptions['userStorage'] /** * OAuth flow to use - defaults to implicit flow. PKCE is recommended for mobile and server-side applications. */