Deleting user profile from firestore database along with Firebase Auth

@F_ORTELL method works very fine for me… I think the problem is with your appVars that you assign for the patch. Please check that is configured correctly. All your set-up looks fine for me @AppNBeer

Um Not close to the pc, look for other code, but what you wanna do is having user details have the same ID as Auth

but how do I do that in the first place? When a user creates an account, I can’t get the firebase user id yet, so the id will be auto generated. It is when the user logs in next time, then I can get its firebase id. My question is how can I modify the existing document id with the firebase id like your screenshots above?

@Bravo_Moossa , appvars? I followed the method, so still trying to work it out :frowning:

The method works if you have enabled firebase Authentication in your app…
1,enable it then then sign in users,
2, login with that user and use get current user flow function to UId and save it as an app variable
3, user that app variable in your hhtp request requires a json body and the method is patch



Change project name (MyappgyverProject) to yours. Change appVars.uid to your app variable


Request body


“fields”: {

             "firstname": {"stringValue": "hello"} ,
             "lastname": {"stringValue": "world"}


Send Ths as it is… If you get it in Firestore then you can change the code to what you need…

Now add toast to your request to see the response code and message

I have followed exactly as you mentioned.

If I created a new user, after sign up it will use the user id as the document id, no problem. However with an existing user, it will create a new record with the user id rather than replacing the existing doc id.

The response code I received is 200, there is no message

OK re-create all users with Ths, is going to help you along the way

will do, thanks again.