OAuth private_key_jwt: authenticate a client with a private-key JWT
Learn how an OAuth client uses a short-lived signed JWT assertion to authenticate, how the assertion differs from a grant, and which audience rule is current.
OAuth private_key_jwt: authenticate a client with a private-key JWT
private_key_jwt lets an OAuth client prove its identity to an authorization server by sending a short-lived JWT assertion signed with its private key. The client does not send a shared secret on every request; the server verifies the signature with a public key registered or otherwise trusted in advance. This is client authentication, not user authentication or an authorization grant. As of November 2026, RFC 10070 updates the audience rule: the client-authentication JWT must use only the authorization server’s issuer identifier as its audience.
How is it different from a client secret?
With a shared-secret method such as client_secret_basic, client and server both hold the same secret. With private_key_jwt, the client protects a private key and registers its corresponding public key so the server can verify signatures. This avoids a shared symmetric secret at both ends and separates key-control points, but it requires careful private-key protection, expiry and rotation, and public-key registration.
This method authenticates the client portion of a request to the token endpoint. A grant is still needed separately. For example, a client can send an authorization code and its client-authentication assertion together when exchanging the code for tokens. It can accompany other grants when server policy permits.
What does the request look like?
RFC 7523 uses two parameters to carry the JWT client assertion:
`client_assertion_type`: `urn:ietf:params:oauth:client-assertion-type:jwt-bearer`
`client_assertion`: one JWT signed by the client
The client normally sends an HTTPS POST to the token endpoint, alongside the grant parameters and client identifier.
POST /token HTTP/1.1
Host: auth.example
Content-Type: application/x-www-form-urlencoded
grant_type=authorization_code
&code=<authorization_code>
&client_id=<registered_client_id>
&client_assertion_type=urn%3Aietf%3Aparams%3Aoauth%3Aclient-assertion-type%3Ajwt-bearer
&client_assertion=<signed_client_authentication_JWT>This is illustrative. Follow the provider’s settings for endpoint, grant, key registration, and JWT policy. Do not put the assertion in a URL or logs.
Validate a client-authentication JWT
The client signs the assertion with a private key trusted by the authorization server. Under RFC 7523, iss identifies the JWT issuer; for client authentication, sub must be the OAuth client_id, and exp limits how long the assertion can be used. Do not assume iss and sub must always be equal; validate claim meanings and values against the server’s registered issuer and client policy. The server also checks signature, expiry, audience, and other validity conditions. RFC 7523 permits jti replay protection, but whether it is required depends on the server policy and current profile.
RFC 7523 previously allowed more flexibility in audience selection. RFC 10070 (November 2026) updates this: the aud of a client-authentication JWT must contain only the authorization server’s issuer identifier. The server must reject an assertion unless that issuer is its sole audience. Do not add the token endpoint or PAR endpoint URL as another audience. RFC 10070 also recommends the typ header value client-authentication+jwt; explicit typing does not replace audience validation.
This audience rule applies to a client-authentication assertion. A JWT used as an authorization grant through an assertion parameter has a different meaning and profile; do not validate both kinds of JWT with the same policy.
Adoption checklist
Confirm `private_key_jwt` support in authorization-server metadata and official documentation.
Create and store the client private key in an appropriate secure key store. Do not put it in an app binary, source repository, or container image.
Register the public key or `jwks_uri` using the server’s required method, and coordinate the `kid` and key-rotation procedure.
Sign a fresh, short-lived client assertion for each token request. Set `sub` to the OAuth `client_id`, `iss` to the registered JWT issuer identifier, and `aud` to the authorization-server issuer alone.
Confirm that client and server support the RFC 10070 audience requirement and a mutually supported JWT signature algorithm.
In a sandbox, check that a valid assertion succeeds and wrong signature, expiry, issuer/audience, or client subject is rejected. Do not log real private keys or assertions.
Plan how to revoke trust in an old public key and switch to a new one after key compromise or rotation, including recovery from failed requests.
Summary
private_key_jwt authenticates an OAuth client with a JWT assertion signed by its private key. Validation must link the assertion to the client identity and a pre-registered public key. Under RFC 10070, the client-authentication JWT audience is now limited to the single authorization-server issuer. Keep this client-authentication step distinct from user login and the authorization grant.
References
[RFC 7523 — JWT Profile for OAuth 2.0 Client Authentication and Authorization Grants](https://www.rfc-editor.org/rfc/rfc7523.html)
[RFC 10070 — Updates to OAuth 2.0 JWT Client Authentication and Assertion-Based Authorization Grants](https://www.rfc-editor.org/rfc/rfc10070.html)
[RFC 8414 — OAuth 2.0 Authorization Server Metadata](https://www.rfc-editor.org/rfc/rfc8414.html)