Reputation: 6154
I'm including a Firebase Auth Token
as part of my POST request to my REST api. I would want to check if the token.length == 1250
before I decode the token to get the user's uid
. I've generated ten different auth tokens and checked all of their length. All of them are 1250 characters in length. Are all of generated tokens' length in 1250 characters or will it sometimes be longer and shorter?
Upvotes: 3
Views: 1268
Reputation: 7438
Token lengths are arbitrary. It depends on the exact information included in the token such as user's name, uid and other custom claims.
Upvotes: 1