resolveAccessToken

suspend fun SupabaseClient.resolveAccessToken(jwtToken: String? = null, keyAsFallback: Boolean = true): String?(source)

Returns the access token used for requests. The token is resolved in the following order:

  1. jwtToken if not null

  2. SupabaseClient.resolveAccessToken if not null

  3. Auth.currentAccessTokenOrNull if the Auth plugin is installed

  4. SupabaseClient.supabaseKey if keyAsFallback is true


suspend fun <C : MainConfig> SupabaseClient.resolveAccessToken(plugin: MainPlugin<C>, keyAsFallback: Boolean = true): String?(source)

Returns the access token used for requests. The token is resolved in the following order:

  1. MainConfig.jwtToken if not null

  2. SupabaseClient.resolveAccessToken if not null

  3. Auth.currentAccessTokenOrNull if the Auth plugin is installed

  4. SupabaseClient.supabaseKey if keyAsFallback is true