Kotlin: Auth Admin
- Any method under the
supabase.auth.admin namespace requires a secret key.
- These methods are considered admin methods and should be called on a trusted server. Never expose your
secret key in the browser.
Examples
Create server-side auth client
val supabase = createSupabaseClient(
supabaseUrl = "https://id.supabase.co",
supabaseKey = "supabaseKey"
) {
install(Auth) {
minimalSettings() //disables session saving and auto-refreshing
}
// install other plugins (these will use the secret key)
}
supabase.auth.importAuthToken("your-secret-key")
// Access auth admin api
val adminAuthClient = supabase.auth.admin