mirror of
https://github.com/supabase/supabase.git
synced 2026-10-16 14:49:10 +03:00
Merge pull request #8514 from supabase/fix/default-storage-key
fix: add a custom storage key
This commit is contained in:
1 file changed
+3
-1
@@ -3,9 +3,11 @@ import { GoTrueClient, User } from '@supabase/gotrue-js'
|
||||
export const GOTRUE_URL =
|
||||
process.env.NEXT_PUBLIC_GOTRUE_URL || `${process.env.SUPABASE_URL}/auth/v1`
|
||||
|
||||
export const STORAGE_KEY = process.env.NEXT_PUBLIC_STORAGE_KEY || 'supabase.dashboard.auth.token'
|
||||
|
||||
export const auth = new GoTrueClient({
|
||||
url: GOTRUE_URL,
|
||||
autoRefreshToken: true,
|
||||
storageKey: STORAGE_KEY,
|
||||
})
|
||||
|
||||
export const getAuthUser = async (token: String): Promise<any> => {
|
||||
|
||||
Reference in new issue
Block a user