We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 46b8d2d commit b55d386Copy full SHA for b55d386
src/SupabaseClient.ts
@@ -265,9 +265,11 @@ export default class SupabaseClient<
265
}
266
267
private _initRealtimeClient(options: RealtimeClientOptions) {
268
+ const authHeader = options.headers?.Authorization
269
+ const authToken = authHeader?.startsWith('Bearer ') && authHeader.split(' ')[1]
270
return new RealtimeClient(this.realtimeUrl, {
271
...options,
- params: { ...{ apikey: this.supabaseKey }, ...options?.params },
272
+ params: { ...{ apikey: authToken || this.supabaseKey }, ...options?.params },
273
})
274
275
0 commit comments