vimalloc/flask-jwt-extended

RS512 not supported

IDidPython opened this issue · 2 comments

When I set
app.config['JWT_ALGORITHM'] = 'RS512'
And then try to request to an endpoint with a RS512 token I get in return
{"msg":"Algorithm not supported"}

How to solve this?

You need to include the optional cryptography dependency to use RSA.

pip install flask-jwt-extended[asymmetric_crypto]

See these for details:

https://flask-jwt-extended.readthedocs.io/en/stable/installation.html

https://pyjwt.readthedocs.io/en/stable/usage.html#encoding-decoding-tokens-with-rs256-rsa

This indeed works, thank You very much