Closed MateusAmin closed 2 years ago
Hi @MateusAmin!
Thank you for opening this issue! Just to get a bit more context, what is the reason why you need this feature?
It looks like the end point for deleting a user needs service_role
or supabase_admin
, which means it can only be called from a backend. Are you using Dart as your backend right now?
It looks like the JavaScript library might be separated into two libraries, one for client side and one for server side as discussed here, so I'm thinking maybe it's better to wait for that to happen and if there are folks using Dart on the server side, create something like a supabase-admin-dart
library and include this feature there.
Would like to hear what you think @phamhieu .
Hi dshukertjy,
Thanks for following up. We are making an education application and wanted people to be able to remove their accounts. Not super important but we always hate it when we can't delete our own accounts on random sites.
Yeah, we are using Dart as our back-end. Seems like it is speeding up development so far.
Splitting the two libraries seems very ergonomic. I like the idea. Perfectly fine with this not getting merged if that is what you are going for.
Thanks @MateusAmin for your quick reply!
Wow, it's amazing that you are using Dart as your backend! I think it's my first time talking to someone who is doing that! Do you use something like aqueduct.io?
I want to hear what @phamhieu whether to wait for the js library splitting up, or just add this and split the dart library later on, so if you could hold on for now, it would be greatly appreciated! Thank you for your patients.
Hi @MateusAmin, It will be faster to send the delete request to gotrue server from your backend api than waiting for a new library.
Let me know if you have any problem doing that. And i'm keen to hear more about your education app.
Feature request
Is your feature request related to a problem? Please describe.
I would like my users to be able delete their accounts and associated data.
Describe the solution you'd like
https://supabase.io/docs/reference/javascript/delete-user
Describe alternatives you've considered
Additional context
https://github.com/netlify/gotrue/blob/feb3c89564b573e306119a83b918f2e76c91a9a0/api/admin.go#L226-L250 https://github.com/supabase/gotrue-js/blob/master/src/GoTrueApi.ts#L251 https://github.com/supabase/gotrue-dart/blob/main/lib/src/gotrue_api.dart