[SOLVED] How do you FETCH/GET Firebase Authentication User UID at the sign-in?

For anyone who need to reference this later, here’s the solutions. Thanks to @Fred_Kuzyk!

image

Add “Get Current User (Firebase Auth)” in the logic and set the assigned value of the “Set app variable” to “Output Value of Another Node > Get Current User (Firebase Auth) > uid”


Hello everyone! I always appreciate the community for all the helps.

As a pre-step to only show documents associated to each user, I’m trying to FETCH/GET the user UID from the Firebase Authentication.

My thought process is

  1. Create an app variable (AppVars.UID)
  2. Create a Get Record and Set App Variable logic in the sign-in button
  3. Store the UID in the AppVars.UID

The challenge I have is

  1. I only see ID and not UID in both Get Record and Set App Variable settings.

  2. I saw a couple of other threads that use the HTTP Get method. Does this work in this case? It seems like it is only for an actual database. The Firebase Authentication only stores User data in the Authentication page and not in the DB. Is there a way to store them in a Firestore DB?

Thanks!

Install the get current user (firebase auth) component from the marketplace to get the uid from the output.

It worked! This will allow me to do do many other things. Thank you so much!

image

1 Like

image

Be careful how you use it though as this UID should not be exposed to the public.

1 Like