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 04ce093 commit 793bbdeCopy full SHA for 793bbde
packages/core/realtime-js/src/RealtimeClient.ts
@@ -187,6 +187,13 @@ export default class RealtimeClient {
187
188
this._setConnectionState('connecting')
189
190
+ // Trigger auth if needed and not already in progress
191
+ // This ensures auth is called for standalone RealtimeClient usage
192
+ // while avoiding race conditions with SupabaseClient's immediate setAuth call
193
+ if (this.accessToken && !this._authPromise) {
194
+ this._setAuthSafely('connect')
195
+ }
196
+
197
// Establish WebSocket connection
198
if (this.transport) {
199
// Use custom transport if provided
0 commit comments