Skip to content

Commit

Permalink
fix: Realtime set auth on handleTokenChanged
Browse files Browse the repository at this point in the history
  • Loading branch information
filipecabaco committed Dec 18, 2024
1 parent 7a2ba52 commit c5b31c5
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/SupabaseClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -336,10 +336,12 @@ export default class SupabaseClient<
this.changedAccessToken !== token
) {
this.changedAccessToken = token
} else if (event === 'SIGNED_OUT') {
this.realtime.setAuth()
} else if (event === 'SIGNED_OUT') {
if (source == 'STORAGE') this.auth.signOut()
this.changedAccessToken = undefined
this.realtime.setAuth()
}
console.log(event)
}
}

0 comments on commit c5b31c5

Please sign in to comment.