Add endpoint for deleting a user's account
See original GitHub issueLike the title suggests, it would be nice to give users the ability to delete their accounts.
It could be done with minor changes to the UserView. Just replace RetrieveUpdateAPIView
with RetrieveUpdateDestroyAPIView
, I think.
Issue Analytics
- State:
- Created 7 years ago
- Reactions:3
- Comments:5 (2 by maintainers)
Top Results From Across the Web
Delete user API endpoint - SecureAuth Documentation
Use this guide to to delete an end user from a Microsoft SQL Server data store through the SecureAuth Identity Management API. To...
Read more >REST API - DELETE User - Documentation – Commvault
This operation deletes a user and transfers the ownership of entities such as alerts, scheduled policies, and workflows from the deleted ...
Read more >POST: User Delete - Braze
Use this endpoint to delete any user profile by specifying a known user identifier. Up to 50 external_ids , user_aliases , or braze_ids...
Read more >Delete Account User by Email – Act-On Developer Network
This endpoint allows you to delete a user by their email address. Parameters. Name, Parameter Type, Allow Multiple, Required/ Optional, Data Type ...
Read more >REST API endpoint to delete customer account - Jira - Atlassian
Problem Definition: There are endpoints to add user, remove user and all in Jira service desk but there is no endpoint to delete...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Deactivation and account deletion will always be very specific to each project. Its not as simple as disabling or deleting a user. So I can understand that djoser would not offer it. However, in the same way that djoser offers activation with optional email confirmation required, perhaps it could implement a deactivation endpoint and view with email confirmation required as well (I imagine this would be a standard requirement across all projects. Obviously, with a caveat in the docs that all actions on user-specific objects, etc, have to be handled on a custom basis by the developer.
I still doubt that this will be implemented, as it would have to be, by definition, an incomplete endpoint - with users asking for all sorts of functionality after this. And you can already get this basic functionality with djoser’s existing password reset views. There are more pressing issues at the moment. JWT / OAuth, etc…
As a side-note, the best thing about djoser, is the lack of dependencies. I would be very concerned that by implementing user management, it would turn into a dependency nightmare like the django-rest-auth / allauth combination.
If
djoser
offers registration and activation, then it should offer deactivation, no?