-
-
Notifications
You must be signed in to change notification settings - Fork 183
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(supabase)!: make Supabase credentials private in SupabaseClient
#649
Conversation
SupabaseClient
private
/// Creates a Supabase client to interact with your Supabase instance. | ||
/// | ||
/// [supabaseUrl] and [supabaseKey] can be found on your Supabase dashboard. | ||
/// | ||
/// You can access none public schema by passing different [schema]. | ||
/// | ||
/// Default headers can be overridden by specifying [headers]. | ||
/// | ||
/// Custom http client can be used by passing [httpClient] parameter. | ||
/// | ||
/// [storageRetryAttempts] specifies how many retry attempts there should be to | ||
/// upload a file to Supabase storage when failed due to network interruption. | ||
/// | ||
/// [realtimeClientOptions] specifies different options you can pass to `RealtimeClient`. | ||
/// | ||
/// Pass an instance of `YAJsonIsolate` to [isolate] to use your own persisted | ||
/// isolate instance. A new instance will be created if [isolate] is omitted. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This chunk of comment is included in the macro below.
SupabaseClient
privateSupabaseClient
private
I really like the new tests! But I think we should keep rest and realtime public. Some might do some heavy channel management via the realtime object and the headers should be editable per sub library as concluded here |
SupabaseClient
privateSupabaseClient
@Vinzent03 Thanks for the reminder. Made |
What kind of change does this PR introduce?
Make the following private, because users shouldn't need to access them using the client library.
realtime
(RealtimeClient instance)rest
(PostgrestClient instance)Additional context
I feel like there might have been a use case where the
rest
needed be public, but I cannot find the issue that had context about it. I feel like it had something to do with headers, which I think should now be solved since we expose a setter, but if anyone has a use cases for any of these to be public, please do let me know!Edited:
Not making
rest
andrealtime
private #649 (comment)