Merge pull request #8514 from supabase/fix/default-storage-key

fix: add a custom storage key
This commit is contained in:
Alaister Young authored and GitHub committed 2022-08-19 15:41:10 +10:00
commit 54a1b0898a
1 file changed
+3 -1
+3 -1
View File
@@ -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> => {