I have this issue on Ubuntu 18.04 in the Docker. When I develop this app on macOS there is no such error.
I build image with this Dockerfile: https://pastebin.com/rG32a0dv
requirements.txt:
Flask==1.0.2
uWSGI==2.0.17.1
Authlib==0.10
cryptography==2.3.1
Usage in code:
header = {'alg': 'RS256'}
payload = {'login': login}
auth_token = jwt.encode(header, payload, private_key)
and
try:
claims = jwt.decode(auth_token, public_key)
except BadSignatureError:
return False
Whole the Flask app: https://pastebin.com/9vVJQL1w
And I have the error:
authlib.specs.rfc7515.errors.UnsupportedAlgorithmError: unsupported_algorithm:
Details: https://pastebin.com/MjFRce1F
Why this error appears? What can I do to fix it?