The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.
TypeScript aialternativeauthdatabasedenoembeddingsexamplefirebasenextjsoauth2pgvectorpostgispostgrespostgresqlpostgrestrealtimesupabasevectorswebsockets
feat: enable gotrue debug flag via localstorage
Stojan Dimitrovskie302638d2ae9
diff --git a/package-lock.json b/package-lock.jsonindex 8f7cf61213f..1b914615e5d 100644--- a/package-lock.json+++ b/package-lock.json@@ -42804,7 +42804,7 @@"license": "MIT","dependencies": {"@headlessui/react": "^1.7.14",- "@supabase/gotrue-js": "^2.31.0",+ "@supabase/gotrue-js": "^2.35.0","@supabase/ui": "^0.37.0-alpha.50","react-use": "^17.4.0"},@@ -42817,9 +42817,9 @@}},"packages/common/node_modules/@supabase/gotrue-js": {- "version": "2.31.0",- "resolved": "https://registry.npmjs.org/@supabase/gotrue-js/-/gotrue-js-2.31.0.tgz",- "integrity": "sha512-YcwlbbNfedlue/HVIXtYBb4fuOrs29gNOTl6AmyxPp4zryRxzFvslVN9kmLDBRUAVU9fnPJh2bgOR3chRjJX5w==",+ "version": "2.35.0",+ "resolved": "https://registry.npmjs.org/@supabase/gotrue-js/-/gotrue-js-2.35.0.tgz",+ "integrity": "sha512-bLNIrBzFNRR61qUN8VZ4iV7q+fPilWyYQi0CZlxuHBiPtVcNPTul02DbNvgvw76hNz+mB5maay/Y17lSHnSRmw==","dependencies": {"cross-fetch": "^3.1.5"}diff --git a/packages/common/gotrue.ts b/packages/common/gotrue.tsindex 9df248b6197..2ef1061dfe7 100644--- a/packages/common/gotrue.ts+++ b/packages/common/gotrue.ts@@ -1,9 +1,18 @@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'++const debug =+ process.env.NEXT_PUBLIC_IS_PLATFORM === 'true' &&+ globalThis &&+ globalThis.localStorage &&+ globalThis.localStorage.getItem(AUTH_DEBUG_KEY) === 'true'export const gotrueClient = new GoTrueClient({url: process.env.NEXT_PUBLIC_GOTRUE_URL,storageKey: STORAGE_KEY,detectSessionInUrl: true,+ debug,})diff --git a/packages/common/package.json b/packages/common/package.jsonindex eba24a4faeb..f41a62d834e 100644--- a/packages/common/package.json+++ b/packages/common/package.json@@ -6,7 +6,7 @@"license": "MIT","dependencies": {"@headlessui/react": "^1.7.14",- "@supabase/gotrue-js": "^2.31.0",+ "@supabase/gotrue-js": "^2.35.0","@supabase/ui": "^0.37.0-alpha.50","react-use": "^17.4.0"},diff --git a/studio/lib/local-storage.ts b/studio/lib/local-storage.tsindex d9747df8753..ce3d2b3f271 100644--- a/studio/lib/local-storage.ts+++ b/studio/lib/local-storage.ts@@ -5,6 +5,7 @@ export const LOCAL_STORAGE_KEYS_ALLOWLIST = ['theme','supabaseDarkMode','supabase.dashboard.sign_in_clicks',+ 'supabase.dashboard.auth.debug',]export function clearLocalStorage() {