Skip to content

Commit

Permalink
report issue if custom access token is assigned
Browse files Browse the repository at this point in the history
  • Loading branch information
grdsdev committed Dec 2, 2024
1 parent fc406ea commit f637fb4
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions Sources/Supabase/SupabaseClient.swift
Original file line number Diff line number Diff line change
Expand Up @@ -407,6 +407,15 @@ public final class SupabaseClient: Sendable {
guard let self else { return "" }
return try await self.auth.session.accessToken
}
} else {
reportIssue(
"""
You assigned a custom `accessToken` closure to the RealtimeClientV2. This might not work as you expect
as SupabaseClient uses Auth for pulling an access token to send on the realtime channels.
Please make sure you know what you're doing.
"""
)
}

return RealtimeClientV2(
Expand Down

0 comments on commit f637fb4

Please sign in to comment.