You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(mTLS): add Mutual TLS (RFC 8705) client authentication support
Implements RFC 8705 mTLS client authentication, allowing applications to
authenticate with Auth0 using a TLS client certificate instead of a
client_secret. Certificate-bound access tokens (cnf.x5t#S256) are issued
automatically when the IdP supports them.
Key changes:
- New `useMtls` config option (also via AUTH0_MTLS env var); defaults to false
- When enabled, switches client auth method to `tls_client_auth` (TlsClientAuth()
from openid-client v6) and sets `use_mtls_endpoint_aliases: true` so token/userinfo
requests are routed to the mtls_endpoint_aliases advertised in discovery
- `customFetch` is required when useMtls=true; throws MtlsError at init time if missing
- `clientSecret` is no longer required when useMtls=true — the cert is the credential
- New MtlsError / MtlsErrorCode exported from the package for structured error handling
- 14 new tests covering config validation, clientMetadata flag, endpoint alias routing,
customFetch invocation and graceful fallback when aliases are absent
0 commit comments