Skip to content

Need help using customToken to login for RTDB data push #137

Closed Answered by mobizt
69thPi asked this question in Q&A
Discussion options

You must be logged in to vote

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

// {"alg":"RS256","typ":"JWT"}

Payload

// {"iss":"<email>","sub":"<email>","aud":"<audience>","iat":<timstamp>,"exp":<expire>,"uid":"<uid>","claims":"<claims>"}

This is the example that allows custom UID authentication, the signed JWT was created internally.

Replies: 2 comments 2 replies

Comment options

You must be logged in to vote
2 replies
@69thPi
Comment options

@mobizt
Comment options

Answer selected by mobizt
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants