lepture / authlib

The ultimate Python library in building OAuth, OpenID Connect clients and servers. JWS,JWE,JWK,JWA,JWT included.
https://authlib.org/
BSD 3-Clause "New" or "Revised" License
4.49k stars 448 forks source link

EdDSA fails to decrypt JWTs #667

Open Arzumify opened 1 month ago

Arzumify commented 1 month ago

Describe the bug

No matter which key format I use, I cannot use EdDSA to decode JWTs.

Error Stacks

ValueError: ('Could not deserialize key data. The data may be in an incorrect format, the provided password may be incorrect, it may be encrypted with an unsupported algorithm, or it may be an unsupported key type (e.g. EC curves with explicit parameters).', [<OpenSSLError(code=503841036, lib=60, reason=524556, reason_text=unsupported)>])

To Reproduce

Generate a JWT key using EdDSA and then attempt to decode it

Expected behavior

The key to decode

Environment:

Additional context

It seems to work fine in JoseRFC, but many projects still rely on authlib and both should still work.