From d9b08e01764ad488f8fda1708e9709ab2e8745bc Mon Sep 17 00:00:00 2001 From: Ulrich Herzkamp Date: Sat, 8 Jul 2023 17:44:52 +0200 Subject: [PATCH] feat: add debug option for gotrue client --- package-lock.json | 8 ++++---- package.json | 2 +- src/SupabaseClient.ts | 2 ++ src/lib/types.ts | 4 ++++ 4 files changed, 11 insertions(+), 5 deletions(-) diff --git a/package-lock.json b/package-lock.json index 5eb458885..1bf55da9f 100644 --- a/package-lock.json +++ b/package-lock.json @@ -10,7 +10,7 @@ "license": "MIT", "dependencies": { "@supabase/functions-js": "^2.1.0", - "@supabase/gotrue-js": "^2.31.0", + "@supabase/gotrue-js": "^2.39.0", "@supabase/postgrest-js": "^1.7.0", "@supabase/realtime-js": "^2.7.3", "@supabase/storage-js": "^2.5.1", @@ -1061,9 +1061,9 @@ } }, "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.39.1", + "resolved": "https://registry.npmjs.org/@supabase/gotrue-js/-/gotrue-js-2.39.1.tgz", + "integrity": "sha512-qRz9mBleA/QATGKOdMAUjpn+YcbZJrTHyWQCe2hAFqJo15JIe1XziD1ZeFraRpsXwja+vONslGeynGv7H8ZZeQ==", "dependencies": { "cross-fetch": "^3.1.5" } diff --git a/package.json b/package.json index d4bfa8d53..25adb1518 100644 --- a/package.json +++ b/package.json @@ -38,7 +38,7 @@ }, "dependencies": { "@supabase/functions-js": "^2.1.0", - "@supabase/gotrue-js": "^2.31.0", + "@supabase/gotrue-js": "^2.39.0", "@supabase/postgrest-js": "^1.7.0", "@supabase/realtime-js": "^2.7.3", "@supabase/storage-js": "^2.5.1", diff --git a/src/SupabaseClient.ts b/src/SupabaseClient.ts index 0c64cc2bf..fbb3bb8ce 100644 --- a/src/SupabaseClient.ts +++ b/src/SupabaseClient.ts @@ -252,6 +252,7 @@ export default class SupabaseClient< storage, storageKey, flowType, + debug, }: SupabaseAuthClientOptions, headers?: Record, fetch?: Fetch @@ -269,6 +270,7 @@ export default class SupabaseClient< detectSessionInUrl, storage, flowType, + debug, fetch, }) } diff --git a/src/lib/types.ts b/src/lib/types.ts index 6787226c6..d6c4047f2 100644 --- a/src/lib/types.ts +++ b/src/lib/types.ts @@ -40,6 +40,10 @@ export type SupabaseClientOptions = { * OAuth flow to use - defaults to implicit flow. PKCE is recommended for mobile and server-side applications. */ flowType?: SupabaseAuthClientOptions['flowType'] + /** + * If debug messages for authentication client are emitted. Can be used to inspect the behavior of the library. + */ + debug?: boolean } /** * Options passed to the realtime-js instance