v0.3.8 — OAuth2 token-endpoint authentication method
Features
-
OAuth2 token-endpoint authentication method is now selectable (#452): some providers only accept client credentials as an HTTP Basic header at the token endpoint (
client_secret_basic, RFC 6749 §2.3.1) and answer401to credentials sent in the request body. The engine has honouredtokenAuthMethodsince v0.3.5 — for the authorization-code exchange and later refreshes — but it could only be set by hand-craftingauthConfig, which made it effectively unreachable.The connector form now offers Token endpoint authentication on create and edit: client secret in body (default) or HTTP Basic header. Two endpoints back it:
GET /api/connectors/:id/oauth-configCurrent non-secret settings. The client secret and issued tokens are never returned — only hasClientSecret/hasAccessToken/hasRefreshToken.PATCH /api/connectors/:id/oauth-configPartial update, merged into the existing authConfig.The PATCH merges rather than replaces on purpose:
authConfigalso holds the issued access/refresh tokens and the endpoints captured during authorization, so a full write would silently destroy a working authorization. Omitted fields keep their value;tokenAuthMethod: ""resets to the default.Reported by a user connecting Datto RMM (
merlot-api.centrastage.net); DATEV requires the same. Verified read-only against Datto's token endpoint: credentials in the body return401withWWW-Authenticate: Basic realm="oauth2/client", while the Basic header passes client authentication.
Fixes
- OAuth2 client credentials were never saved from the connector edit page (#452): the Client ID and Client Secret inputs were rendered but silently discarded —
buildAuthConfig()had noOAUTH2case and fell through to returningundefined. The placeholder even read "Leave empty to keep current", which made the no-op look intentional. They now persist through the merge endpoint. - The auth-method selector is pre-filled from the stored configuration; without that, saving any unrelated field would have silently reset a connector already configured for HTTP Basic.
Maintenance
Dependency updates across the Prisma, Sentry, Radix UI, Playwright, ESLint/Prettier and Jest groups, plus soap and next.
Upgrading
No schema changes and no configuration changes. Existing OAuth2 connectors keep their current behaviour; switch a connector to HTTP Basic only if its provider requires it, then re-run Authorize with Provider so a token is fetched the new way.
Verification: backend 3469 tests green (+12 covering merge semantics, the empty-body no-op, non-OAuth2 rejection, role enforcement, and that the GET leaks neither secret nor tokens), typecheck clean; frontend typecheck + build + e2e clean.
Docs: docs/connectors/rest.md — new Token endpoint authentication section with a Datto RMM example.