Currently , I am implementing an android app and we have a requirement to provide delete functionality. As per Google ,all the app which has Sign up feature , should also provide delete account feature. How to implement it in my app? Because the access token which I am receiving now, doesn’t have delete:users scope. Any help would be appreciated.
Hi @vijayazararia , the user cannot get an Access Token with the delete:users
scope during login. Your backend/API can do that though by following the guide here: Get Management API Access Tokens for Production
Our recommendation here is to:
- When the user attempts to delete the profile, send a request to your backend/API with the user’s access token.
- The backend should first validate the access token and get the user_id (sub) from the token.
- The backend generates a new Access Token for the Management API.
- The backend deletes the user and sends a successful response back to the app.
- The app, after getting the response, logs out the user.
I hope that helps.
1 Like
Thanks a lot @thameera , it really helped. Very well explained.
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.