-
Couldn't load subscription status.
- Fork 19
Open
Description
To connect to Supabase via a Firebase issued JWT, you need to use the createSupabaseClient method of SupabaseClientBuilder:
createSupabaseClient(
supabaseUrl = BuildConfig.SUPABASE_URL,
supabaseKey = BuildConfig.SUPABASE_ANON_KEY,
builder = {
this.accessToken = {
Firebase.auth.currentUser?.getIdToken(false)?.await()?.token
}
install(Postgrest)
// install(Auth) <-- This is not possible as you can't use the Auth plugin when using the custom AccessTokenProvider
},
)
When doing so, you can't use the Auth plugin as you provide an AccessTokenProvider, this is a limitation of the SupabaseClient. Thus, you can't use the SupabaseConnector as it checks for the Auth plugin and crashes without it.
Note that it's easy to bypass limitation by just copy/pasting the SupabaseConnector code and adapting it to my own codebase but it might be something you guys want to offer as a feature here.
Metadata
Metadata
Assignees
Labels
No labels