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