I've been trying to share JWT access token with multiple Flask application, but there is no luck. Anyone please kindly advise me how to solve the problem?
I have three flask applications:
- localhost:5000
- localhost:5001
- localhost:5002
I use nginx reverse proxy for forwarding traffic to the backend apis based on the frontend requests. For instance:
- auth.example.com to localhost:5000
- service1.example.com to localhost:5001
- service2.example.com to localhost:5002
The three flask applications using jwt-extended with same configuration. SECRET_KEY and JWT_SECRET_KEY of the three applications are pretty much the same.
when login to auth.example.com, I received the access token. However, I cannot use the token to make request on service1.example.com.
I receive 422 error with following response body
{
"errors": "Missing claim: identity"
}
The access token can only use with auth.example.com