Skip to content

setAuthToken

//fluxbase-kotlin/io.github.nimbleflux.fluxbase.core/FluxbaseHttpClient/setAuthToken

[jvm]
fun setAuthToken(token: String?)

Update the authorization token.

  • With a non-null token: sets Authorization: Bearer <token>.
  • With null: restores the anon key if one is set (does NOT remove the header). This is how sign-out falls back to anonymous access — see fetch.ts:93-102.