Hi
I'm trying to create a custom token on a server, but I get INVALID_CUSTOM_TOKEN error message.
I tried in python (python-jose) and in .net (jose-jwt) using RS256. I also tried HS256. Validating the tokens and signatures worked in
jwt.io, but not in firebase.
When trying firebase's example code KJUR's lib jsrsasign it works with RS256.
Here is the python code i used:
from jose import jwt
payload = {
"exp": 1489194535,
"iat": 1412034535,
"iss": "service account email",
"sub": "service account email",
"uid": "user",
}
key = '-----BEGIN PRIVATE KEY-----...'
token = jwt.encode(payload, key, algorithm='RS256', headers = {'kid': 'xxx'})
print token
getting a token from KJUR.jws.JWS.sign with exactly the same request works fine..
Please advise.
Kirill