Delete user account in Firebase authentication - REST API

Hello Everyone!!

Is anyone there know how to configure the flow functions to DELETE a verified user account from Firebase auth through REST Api. Found many discussion and tutorial about,

How to do User Sign-up with firebase and Setup AppGyver and Firebase REST API from the forum also many youtube videos explaining

How to Sign-up, Sign-in, Auto Sign in, Email verification Password reset and all using Firebase Auth REST API reference.

Any how I managed to make Sign-up, Sign-in, verification, reset password, logout and auto sign-in, All works fine for me in my app except Delete Account. Here is my screenshots… Could anyone can solve this for me.

When I press Delete Account, I need to remove the user from my firebase authentication users list. I use the flow functions above. More flow function details screenshots bellow.

In the above app bellow points already set-up and working fine.

  1. Sign-up with email verification.
  2. Sign-in with verified email only.
  3. Auto Sign-in while refresh with refreshToken.
  4. Logout
  5. Password reset.

Appreciate the solution…

Hi @Bravo_Moossa … it looks like you have everything set up correctly. Here is my setup which works fine.


Thanks for your quick response @vereggen
Tried to set up pagevar but in value binding option I couldn’t found the binding option “Object with properties” in my app… can you explain for me please

Can you please expand your flow functions to check how do you set up all the flow??

In variables, set page variable type to object, add property idToken.

1 Like

Thanks @dwidge @vereggen for your support…

Everything smooth except this DELETE user functionality.

Like you said, added pageVars object with property idToken… I can find the property ‘idToken’ in binding object with properties… still I cant go ahead of that as I couldn’t bind idToken property with “currentUser.id_token”… Where I go wrong, hard to figure out for me…

Screeshots bellow,

FYI, I didn’t store any user data to my firebase database while sign up using create record flow function.

Here’s my page variable setup …


currentUser.id_token is where I store the firebase user-id as an app variable. Where are you storing the user id from your logged-in user?

Thanks @vereggen

You are asking about the “localId” of the firebase sign-in response? This one bellow

the bellow screenshot explain more to you I guess!!

page refresh token flow page mounted.

Sign in button flow functions

Hope you will figure out from this @vereggen

Yup … that’s it. Is that what you are assigning to idToken in the request body of the REST API call for delete user account?

Thanks @vereggen

For appVars idToken am assigning the “idToken” response from Sign-In REST API calls and the value is “outputs[“Sign-In”].resBody.idToken”.

Actually I am not assigning any Variables to “localId” response from Sign-in REST API calls… Is that the real issue am facing @vereggen Can you please suggest some solutions.

It looks like you are grabbing and passing the correct user id (idToken). What error message are you getting back from firebase when you try to delete a user?

As my understanding is correct, the flow only works until Get items from the storage. I put a toast on the success node I am getting the idToken in toast. But after that there is no error message retrieve from the Delete user flow function, even the error message @vereggen

Cheers!! @vereggen

Play around with some stuffs! Now it work fine! Thanks for your quick support @vereggen @dwidge Appreciate…

I have got users in repeat data field. I have the User ID updated from Firebase Authentication and that updates a Page Variable when they log in.

Any ideas how to set up the HTTP request. It seems to fail everytime. Here what I currently have.
Screenshot 2022-07-27 at 17.33.29

Your request body should be in “json” format and should match the exact schema like this {"idToken":"[FIREBASE_ID_TOKEN]"} and [FIREBASE_ID_TOKEN] with the user’s Firebase ID token.

Hope this will help!

Tried this, get an error 400-500

I’ve currently got that setup via a list of objects, to create the correct schema, just seems to be returning a 400-500 error at the moment, any ideas?

Hey Nathan,

I hope You sorted it out!

This morning I was able to

  • request Firebase ID Token
  • pass the response to page variable (for me I nested it as ‘idToken’ in object page variable ‘DeleteUser’
  • in http request I made the body {“idToken”:pageVars.DeleteUser.idToken}

Now it all works fine.

Thanks Bravo_Moossa and vereggen, You made it possible :slight_smile: