-
Hello everyone, Can someone please share an example of using the CustomToken to generate and IDToken and get access to RTDB and push data to it? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
Why you need to use CustomToken? You should read the library documentation to understand the basic concept and authentication supports. For |
Beta Was this translation helpful? Give feedback.
-
|
Beta Was this translation helpful? Give feedback.
You have to use Service Account credentials that belong to Firebase project to generate the JWT.
The private key was used in JWT signing.
The UID is what you defined in the payload and please make sure that the signing algorithm is RS256 in the header.
Header
FirebaseClient/src/core/JWT.cpp
Line 187 in f700d7e
Payload
FirebaseClient/src/core/JWT.cpp
Line 194 in f700d7e
This is the example that allows custom UID authentication, the signed JWT was created internally.