Skip to main content

deleteUser()

Delete a user. Requires a service_role key.

This function should only be called on a server. Never expose your service_role key in the browser.

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

Parameters

  • uidrequiredstring

    The user uid you want to remove.

Notes

  • Requires a service_role key.
  • This function should be called on a server. Never expose your service_role key in the browser.

Examples

Remove a user completely.

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