Templates Plugins Courses

Firebase Authenticate idToken

Hi - So happy to have found the Firebase Authenticate plugin - was a HUGE help for us since we’re using a Firebase backend. I have a question though. I’m trying to simply display the user’s email and localId when the user is logged in. However, I don’t know what idToken refers to or how to find it. Is it a dynamic value? Or is it a value I get from my Firebase SDK?

The other thing is - what does localId refer to?

I will need to write security rules and I think it’s important to understand what the variables mean.
Thanks for the help!


Hello, @graciolli.f. Thanks for reaching out.

To display the user’s email and localID when the user is logged in, please do the following:

  1. make sure your main page group Type of content is User;
  2. add a group where your user Firebase Email and localID will be displayed, set the Type of content - Get Current User Data;
  3. set the conditions to the Group Get Current User Data - these;
    4 add text elements to the Group Get Current User data, that will display the Firebase User Email and localID - email & localID.

How does it look like in the preview:


How to get it - just Insert dynamic data within the text element, choose option Get data from an external API, choose Get Current User Data as an API Provider, and into the (param) idToken Insert dynamic data again (the idToken you can see is the test one, just delete it), choose Current user, and idToken parameter.

Also, you will be needed to add the idToken data type to your User table, to be able to store this id into your database.

The localID is the User ID, registered in the Firebase system (not the same as UID).

I hope this info will be useful for you :slightly_smiling_face: