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.39k stars 436 forks source link

Have special character encoding be optional #628

Open 2373655r opened 4 months ago

2373655r commented 4 months ago

Problem

I have an OAuth2 client secret with special characters (=,-,/). Special characters are getting encoded following the change in https://github.com/lepture/authlib/pull/594 meaning I cannot authenticate when on 1.3.0 . I also cannot change the client that is generating the secrets containing special characters.

Suggested solution

A parameter that lets you optionally disable encoding special characters in client_id and client_secret, either with the understanding that using a colon character will cause a failure, or have it so that only colon characters are encoded.