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.58k stars 458 forks source link

EdDSA fails to decrypt JWTs #667

Open Arzumify opened 3 months ago

Arzumify commented 3 months 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.

lepture commented 1 month ago

Did https://jose.authlib.org/en/ work for you?

Arzumify commented 1 month ago

Did https://jose.authlib.org/en/ work for you?

Yes