pypi / authlib
authlib
What changed in authlib 1, from its official release notes, upgrade guides and advisories. Sources checked 2026-12-05.
29 breaking20 security8 new APIs and options8 behavior and defaults23 fixes and other
See which of these apply to your code, ranked, in your agent:
npx @unstale/cli initauthlib 188 changes
Breaking changes 29
Confidential clients can no longer authenticate with only client_id on revocation, introspection, and device authorization endpoints; add their authentication method to CLIENT_AUTH_METHODS or they receive invalid_client.
Rejects on decryption a JWE in ECDH-1PU key wrapping mode when enc is not AES_CBC_HMAC_SHA2, matching its existing encryption behavior.
Rejects HMAC-SHA1 and PLAINTEXT signatures from clients without a client secret, preventing impersonation of clients registered with an RSA key only.
Rejects JWE JSON Serialization with more than 16 recipients, limiting the private-key operations a message can trigger.
Rejects an ID-JAG with a cnf claim because Authlib does not support DPoP or mTLS key bindings and previously accepted bound ID-JAGs without proof of possession.
Refuses OpenSSH public keys and certificates it can load as RSA, EC, or OKP keys as HMAC secrets, preventing public-key holders from forging HS256 tokens.
The OpenID Connect implicit and hybrid grants reject form_post when the redirect URI does not use http or https, returning invalid_request without redirecting.
Limits access-token scopes to the ID-JAG scope claim; without a scope request parameter, the token now receives the claim’s scopes instead of no scope.
Rejects empty HMAC keys with a ValueError, preventing anyone from forging HS256, HS384 and HS512 signatures.
Tokens used for the RFC 7592 client configuration endpoint must implement TokenMixin.check_client.
Requires client authentication for ID-JAG grants.
Enforces key, scope, and audience validation.
Enforces nonce and JAR request validation.
Boolean values are rejected for NumericDate claims.
The client uses httpx2 instead of httpx.
The default authlib.jose.jwt algorithms no longer include none.
Stops nesting the InvalidTokenError extra attribute.
Authlib migrates to joserfc.
A deprecated algorithm was removed from the default registry.
The JOSE module no longer uses the header's jwk automatically.
The default
jwtinstance now has supported algorithms set, affecting which algorithms it supports by default.JWE has been renamed to JsonWebEncryption.
JWK has been renamed to JsonWebKey.
JWS has been renamed to JsonWebSignature.
JWT has been renamed to JsonWebToken.
The Key model has been redesigned.
The deprecated Flask OAuth 2.0 provider configuration has been removed.
Support for Python 2 has been dropped.
Built-in SQLAlchemy integrations have been removed; developers should define the database themselves.
Security 20
Sets the recipient limit for JWE JSON Serialization; the default limit is 16.
IDJAGGrant stores verified ID-JAG claims here so authenticate_user can resolve users using iss and sub, and tenant for a multi-tenant IdP, preventing cross-IdP user access.
Rejects registration access tokens issued to another client with an access_denied error, preventing access to another client's registration.
Authlib: Default JWT bearer grant accepts assertions for the wrong audience
Authlib: ID token can disable its own nonce validation via the nonce_supported claim
Authlib incomplete algorithm-confusion fix permits HMAC forgery with prefixed public keys
Authlib: OpenID implicit grant checks raw scope instead of allowed scope before issuing ID tokens
Authlib: Unvalidated request_uri fetch in JWT-secured authorization request (JAR) leading to SSRF
Fixes validation of empty signatures during JWS JSON deserialization.
Authlib: is_secure_transport() loopback exemption can be bypassed with a userinfo component, allowing cleartext-HTTP URLs to non-loopback hosts
Authlib OAuth 2.0 has Open Redirect in Authorization API that allows attacker-controlled redirect_uri through unsupported response_type
Authlib OIDC Implicit/Hybrid Authorization Vulnerable to Open Redirect
Implements the RFC 9700 PKCE downgrade countermeasure.
Authlib: Cross-site request forging when using cache
Fixes a CSRF issue with the Starlette client.
Authlib: Fail-Open Cryptographic Verification in OIDC Hash Binding
Authlib Vulnerable to JWE RSA1_5 Bleichenbacher Padding Oracle
Authlib: Setting
alg: noneand a blank signature appears to bypass signature verificationAuthlib has 1-click Account Takeover vulnerability
Fixes an incorrect signature when the Content-Type is x-www-form-urlencoded.
New APIs and options 8
Adds support for the Identity Assertion JWT Authorization Grant.
Adds a client_id parameter.
Leeway is configurable for JWT bearer token validation.
AuthorizationServerMetadata can now be composed.
Adds support for RP-initiated logout.
Takes a client parameter.
The ES256K algorithm has been added for JWS and JWT.
OpenID extensions and grant types should define get_jwt_config instead of using the deprecated OAUTH2_JWT_XXX configuration.
Behavior and default changes 8
Client metadata is preferred when guessing algorithms.
Adds a default jti claim when signing a JWT bearer assertion.
Allows non-recommended algorithms in ClientSecretJWT.
Allows non-recommended algorithms in PrivateKey.
Parentheses are optional when using require_oauth.
Sets the client session User-Agent when fetching server metadata and JWKs.
ES256K is now included in the default JWT algorithms.
The default jwt instance now includes EdDSA, so developers can use it without adding it themselves.
Fixes and other changes 23
Returns None when id_token is absent, matching the sync client.
Avoids duplicated OAuth 1.0 parameters in signed requests.
Rate-limit responses no longer cause an uncaught JSONDecodeError; they produce a catchable error instead.
Saves the device credential with the authenticated client id.
Fixes handling of binary form data with httpx OAuth1.
Corrects the protocol name in the OAuth1 error description.
The client can be flexible with JWT headers.
Casts the sub claim to a string.
Catches InvalidKeyIdError in the RFC 9068 validator.
Omits claims whose value is None.
Fixes handling of malformed RFC7523 claims.
Validates BCP47 language tags with a regex.
Fixes RFC7523 signing with non-RSA keys.
Fixes a deprecation warning originating from _joserfc_helpers.
Accepts the issuer URL as a valid audience.
Fixes behavior when expires_at is 0.
Uses the real application object for Flask.
Fixes get_jwt_config.
Support extends from Python 3.10 to 3.14.
Normalizes the resolve_client_public_key method.
Authorization and token endpoints request empty scope parameter management.
A random cek is generated when the provided cek length does not match.
Uses expires_in when expires_at is unparsable.