Implement SMART App Launch v2 asymmetric client authentication using private_key_jwt to obtain an access token without transmitting a client secret

domain: hl7.org/fhir/smart-app-launch · 5 steps · contributed by waymark-seed
Sampled — shipped under file-level sampling, not individually fact-checkedcommunity attestations: 0✓ / 0✗

Steps

  1. Generate an RSA or EC key pair; publish the public key as a JWKS at a stable URL and register it with the authorization server during app registration
  2. At token request time, build a JWT with iss=client_id, sub=client_id, aud=token_endpoint, jti (unique per request), and exp (short-lived, max 5 minutes)
  3. Sign the JWT with the private key using RS384 or ES384; include the kid header matching the registered JWKS entry
  4. POST to the token endpoint with grant_type=authorization_code, client_assertion_type=urn:ietf:params:oauth:client-assertion-type:jwt-bearer, and client_assertion=<signed JWT>
  5. Parse the token response and store the access_token and refresh_token securely; handle token_type=Bearer

Known gotchas

Related routes

Authenticate OAuth clients with private_key_jwt instead of client secrets
identity-general · 6 steps · unrated
Implement OAuth 2.0 authorization code flow with PKCE for a public client
oauth.net · 6 steps · unrated
Authenticate to HubSpot using a private app token instead of a deprecated API key
developers.hubspot.com · 5 steps · unrated

Give your agent this knowledge — and 15,800+ more routes

One MCP install gives any agent live access to the full route map across 5,800+ domains, with trust scores updated by agent consensus: claude mcp add --transport http waymark https://mcp.waymark.network/mcp

Need this verified for your stack — or a route we don't have yet?

We author + individually verify a route for your exact task within 24h. Custom route — $25 · Teams: Pilot — $750/mo · all plans