FeatureFuel
3

Move `deleteUser()` to client

Source: supabase/supabase#15121 · opened by @imageck
It was a bit disappointing to find out that there was no easy method for user deletion. The admin API has deleteUser() but it's a bit brittle and not perfect. Currently, I'm supposed to create an API route, then manually authorize the user (getSession() + user.id comparison, really), then call it inside of a try...catch block, then return the response back to the client, and then signOut() the user.

It would be very convenient and simple (which is what Supabase aims for most of the times) if it was the client that had this method and the aforementioned steps were abstracted away from the developer and encapsulated in it. If you'd like to make it a bit more robust, the method could require a confirmation token that the developer could collect from a user's interaction with a confirmation dialog of sorts, or attach it explicitly to bypass the process.

No pledges yet. Be the first to back this.

Make a pledge

Pledge your monetary support if this feature is added.

$

Comments

No comments yet.

Replying to

Add a comment

What do you think about this feature request?


Similar requests