Skip to content

Commit f637fb4

Browse files
committed
report issue if custom access token is assigned
1 parent fc406ea commit f637fb4

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

Sources/Supabase/SupabaseClient.swift

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -407,6 +407,15 @@ public final class SupabaseClient: Sendable {
407407
guard let self else { return "" }
408408
return try await self.auth.session.accessToken
409409
}
410+
} else {
411+
reportIssue(
412+
"""
413+
You assigned a custom `accessToken` closure to the RealtimeClientV2. This might not work as you expect
414+
as SupabaseClient uses Auth for pulling an access token to send on the realtime channels.
415+
416+
Please make sure you know what you're doing.
417+
"""
418+
)
410419
}
411420

412421
return RealtimeClientV2(

0 commit comments

Comments
 (0)