Standards — OAuth 2.0

Standards

OAuth 2.0 (RFC 6749) is a delegated authorization framework: it lets a user grant an application limited access to a protected resource without sharing their credentials with that application. It defines four roles — the resource owner (typically the user), the client (the application requesting access), the authorization server (which authenticates the resource owner and issues tokens — this is Quasr), and the resource server (the API hosting the protected resource). Quasr implements OAuth 2.0 as its authorization server and aligns with the consolidated OAuth 2.1 draft, which folds in the security best practices the ecosystem converged on since 2012.

Architecture

The primary grant for interactive apps is the Authorization Code grant with Proof Key for Code Exchange (PKCE, RFC 7636): the client obtains a short-lived authorization code via a browser redirect through the resource owner, then exchanges it for tokens directly with the authorization server. PKCE binds that exchange to the specific client that started the flow, closing the interception window that affected the now-removed Implicit grant. Quasr requires PKCE on every authorization code flow, in line with OAuth 2.1.

For machine-to-machine access without a resource owner (e.g. backend service to backend service), OAuth 2.0 defines the Client Credentials grant, where the client authenticates directly to the authorization server using its own credentials and receives an access token scoped to itself.

Tokens & Endpoints

Quasr issues access tokens as JWTs (see RFC 9068, JWT Profile for OAuth 2.0 Access Tokens) so resource servers can validate them locally against the JWKS, without a round-trip to Quasr on every request. Bearer tokens are sent per RFC 6750 as an Authorization: Bearer <token> header. The relevant endpoints on your tenant are:

  • https://{tenant_id}.api.quasr.io/oauth2/authorize — starts the authorization code flow
  • https://{tenant_id}.api.quasr.io/oauth2/token — exchanges a code (or credentials) for tokens, and refreshes tokens
  • https://{tenant_id}.api.quasr.io/oauth2/introspect — lets a resource server check token validity server-side
  • https://{tenant_id}.api.quasr.io/oauth2/revoke — revokes a token

Security Considerations

  • Always use PKCE, even for confidential clients — it protects against authorization code interception regardless of client type.
  • Register exact redirect URIs and match them exactly (no wildcards, no partial matching) to prevent open-redirect and code-interception attacks.
  • Avoid the Implicit and Resource Owner Password Credentials grants — both are removed in OAuth 2.1 due to well-documented weaknesses (token leakage via the URL fragment, and exposing user credentials to the client, respectively).
  • Treat access tokens as opaque credentials on the client side — only the resource server (and Quasr) should rely on their contents; use the ID token if you need identity information in the client.
  • Avoid requesting or storing refresh tokens in browser-based public clients (single-page apps without a confidential backend) — refresh tokens are typically long-lived, so one leaking from browser storage is a much bigger risk than a leaked short-lived access token. Native mobile and desktop apps can reasonably store refresh tokens in OS-level secure storage (Keychain, Keystore, Credential Manager); it's not equivalent to keeping them server-side in a confidential client, but it's a fair trade-off between security and user experience compared to forcing a full re-authentication on every restart.

Resources

2026.11.22 | © Copyright 2026 Quasr BV