mirror of
https://github.com/supabase/supabase.git
synced 2026-10-05 17:35:10 +03:00
remove navigator lock
This commit is contained in:
1 parent
b8a2753ff8
commit
c6124ebfc7
1 file changed
+1
-11
@@ -1,26 +1,16 @@
|
||||
import { GoTrueClient, navigatorLock } from '@supabase/gotrue-js'
|
||||
import { GoTrueClient } from '@supabase/gotrue-js'
|
||||
|
||||
export const STORAGE_KEY = process.env.NEXT_PUBLIC_STORAGE_KEY || 'supabase.dashboard.auth.token'
|
||||
export const AUTH_DEBUG_KEY =
|
||||
process.env.NEXT_PUBLIC_AUTH_DEBUG_KEY || 'supabase.dashboard.auth.debug'
|
||||
export const AUTH_NAVIGATOR_LOCK_KEY =
|
||||
process.env.NEXT_PUBLIC_AUTH_NAVIGATOR_LOCK_KEY || 'supabase.dashboard.auth.navigatorLock.enabled'
|
||||
|
||||
const debug =
|
||||
process.env.NEXT_PUBLIC_IS_PLATFORM === 'true' &&
|
||||
globalThis?.localStorage?.getItem(AUTH_DEBUG_KEY) === 'true'
|
||||
|
||||
const navigatorLockEnabled =
|
||||
process.env.NEXT_PUBLIC_IS_PLATFORM === 'true' &&
|
||||
globalThis?.localStorage?.getItem(AUTH_NAVIGATOR_LOCK_KEY) === 'true'
|
||||
|
||||
export const gotrueClient = new GoTrueClient({
|
||||
url: process.env.NEXT_PUBLIC_GOTRUE_URL,
|
||||
storageKey: STORAGE_KEY,
|
||||
detectSessionInUrl: true,
|
||||
debug,
|
||||
lock:
|
||||
(debug || navigatorLockEnabled) && globalThis.navigator && globalThis.navigator.locks
|
||||
? navigatorLock
|
||||
: undefined,
|
||||
})
|
||||
Reference in new issue
Block a user