Tokens

Firebase

Please refer to the getIdToken method in the Firebase documentation.

Custom

We support custom tokens for customers who do not use Firebase authentication.

The custom tokens are JWT with the following compulsory claims:

{
  "exp": 1234, # Suitable expiration timestamp, we recommend now+15 minutes
  "aud": "delivered-be",
  "iss": "asdfasdf", # This should be your delivered-project-ID
  "sub": "abcdabcd", # This field is your unique user id, as a string.
}

The token should be signed by your backend (not the client) with a pre-agreed signature we provide. The token should use the algorithm HS256.

Let us know if you need more guidance on this matter, and we can point to suitable libraries and provide a sample code in your preferred programming language.