From 153ed4b7fcf7c631868ec373380785a762dd84a3 Mon Sep 17 00:00:00 2001 From: Wen Bo Xie Date: Sat, 4 Feb 2023 01:54:01 -0800 Subject: [PATCH] fix: Revert "feat: pass global header bearer token as apikey to RealtimeClient (#699)" This reverts commit b55d386b35cdf9373fabbbc07199f86811bde339. --- src/SupabaseClient.ts | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/SupabaseClient.ts b/src/SupabaseClient.ts index 153f406f..eba42aac 100644 --- a/src/SupabaseClient.ts +++ b/src/SupabaseClient.ts @@ -265,11 +265,9 @@ export default class SupabaseClient< } private _initRealtimeClient(options: RealtimeClientOptions) { - const authHeader = options.headers?.Authorization - const authToken = authHeader?.startsWith('Bearer ') && authHeader.split(' ')[1] return new RealtimeClient(this.realtimeUrl, { ...options, - params: { ...{ apikey: authToken || this.supabaseKey }, ...options?.params }, + params: { ...{ apikey: this.supabaseKey }, ...options?.params }, }) }