Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RS512 not supported #533

Closed
IDidPython opened this issue Nov 27, 2023 · 2 comments
Closed

RS512 not supported #533

IDidPython opened this issue Nov 27, 2023 · 2 comments

Comments

@IDidPython
Copy link

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?

@vimalloc
Copy link
Owner

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

@IDidPython
Copy link
Author

This indeed works, thank You very much

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants