Delete User

Delete an user.

const { user, error } = await supabase.auth.api.deleteUser(
'715ed5db-f090-4b8c-a067-640ecee36aa0',
'YOUR_SERVICE_ROLE_KEY'
)

Parameters

  • uidrequiredstring

    The user uid you want to remove.

  • jwtrequiredstring

    A valid JWT. Must be a full-access API key (e.g. service_role key).

Examples

Remove a user completely.

const { user, error } = await supabase.auth.api.deleteUser(
'715ed5db-f090-4b8c-a067-640ecee36aa0',
'YOUR_SERVICE_ROLE_KEY'
)