Kotlin: Unlink an identity from a user

Parameters

Examples

Unlink an identity

//get all identities linked to a user
val identities = supabase.auth.currentIdentitiesOrNull() ?: emptyList()

//find the google identity linked to the user
val googleIdentity = identities.first \{ it.provider == "google" \}

//unlink the google identity from the user
supabase.auth.unlinkIdentity(googleIdentity.identityId!!)