Skip to content

Commit 365557b

Browse files
committed
feat: expose auth userStorage option to facilitate lower cookie sizes
1 parent 04a1397 commit 365557b

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

src/SupabaseClient.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -316,6 +316,7 @@ export default class SupabaseClient<
316316
persistSession,
317317
detectSessionInUrl,
318318
storage,
319+
userStorage,
319320
storageKey,
320321
flowType,
321322
lock,
@@ -336,6 +337,7 @@ export default class SupabaseClient<
336337
persistSession,
337338
detectSessionInUrl,
338339
storage,
340+
userStorage,
339341
flowType,
340342
lock,
341343
debug,

src/lib/types.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,12 @@ export type SupabaseClientOptions<SchemaName> = {
3838
* A storage provider. Used to store the logged-in session.
3939
*/
4040
storage?: SupabaseAuthClientOptions['storage']
41+
/**
42+
* 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.
43+
*
44+
* @experimental
45+
*/
46+
userStorage?: SupabaseAuthClientOptions['userStorage']
4147
/**
4248
* OAuth flow to use - defaults to implicit flow. PKCE is recommended for mobile and server-side applications.
4349
*/

0 commit comments

Comments
 (0)