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.
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.
Comments
Similar requests
`deleteUser()`: Add option to delete user-owned files
2 votes · 0 comments
Accept `auth` options passed to `createPagesServerClient`
1 vote · 0 comments
Feature Request: Add upsert / overwrite support to storage.move()
1 vote · 0 comments
Client Libraries
16 votes · 0 comments
Feture Request: Want to get some part of data encrypted via RSA Private keys to avoid client side data manipulation
1 vote · 0 comments
No comments yet.