Skip to content

Commit 4cc9526

Browse files
committed
fix: call set auth for realtime on token changes
1 parent 325c2c9 commit 4cc9526

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/SupabaseClient.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -329,13 +329,13 @@ export default class SupabaseClient<
329329
source: 'CLIENT' | 'STORAGE',
330330
token?: string
331331
) {
332+
this.realtime.setAuth()
332333
if (
333334
(event === 'TOKEN_REFRESHED' || event === 'SIGNED_IN') &&
334335
this.changedAccessToken !== token
335336
) {
336337
this.changedAccessToken = token
337338
} else if (event === 'SIGNED_OUT') {
338-
this.realtime.setAuth()
339339
if (source == 'STORAGE') this.auth.signOut()
340340
this.changedAccessToken = undefined
341341
}

0 commit comments

Comments
 (0)