OAuth 2.0 & OpenID Connect
SingleSign is built on two complementary open standards: OAuth 2.0 for authorization and OpenID Connect (OIDC) for identity. Understanding how these protocols work together will help you make the right design decisions for your integration.
OAuth 2.0 — Authorization
OAuth 2.0 is an authorization framework that lets a user grant a third-party application limited access to their data without sharing their password.
Key Concepts
| Term | Definition |
|---|---|
| Resource Owner | The user who owns the data. |
| Client | Your application that wants to access the user's data. |
| Authorization Server | SingleSign — authenticates the user and issues tokens. |
| Resource Server | An API that accepts access tokens (e.g., your backend or the SingleSign UserInfo endpoint). |
| Access Token | A credential that grants access to protected resources. |
| Refresh Token | A credential used to obtain a new access token without re-authentication. |
The Authorization Code Flow
SingleSign implements the Authorization Code flow, which is the most secure OAuth 2.0 flow for web and mobile applications:
┌────────────┐ ┌──────────────────┐
│ │──1. Authorization Req──▶│ │
│ │ │ │
│ User / │◀─2. Login + Consent────│ SingleSign │
│ Browser │ │ Authorization │
│ │──3. Consent Grant──────▶│ Server │
│ │ │ │
│ │◀─4. Auth Code──────────│ │
└────────────┘ └──────────────────┘
│ ▲
│ │
▼ │
┌────────────┐ │
│ │──5. Code + Verifier────────────▶│
│ Your │ │
│ App │◀─6. Tokens (access, id, refresh)│
│ │ │
└────────────┘ │
- Your app redirects the user to SingleSign's
/oauth/authorizeendpoint. - SingleSign presents a login form and consent screen.
- The user authenticates and approves the requested scopes.
- SingleSign redirects back to your app with an authorization code.
- Your app sends the code (plus PKCE verifier or client secret) to
/oauth/token. - SingleSign returns an access token, ID token, and optionally a refresh token.
Why Not Implicit Flow?
The Implicit flow (response_type=token) delivers tokens directly in the URL fragment, exposing them to browser history and referrer leaks. SingleSign does not support the Implicit flow. Use Authorization Code with PKCE instead.
OpenID Connect — Identity
OpenID Connect (OIDC) is an identity layer built on top of OAuth 2.0. While OAuth 2.0 tells you what a user can access, OIDC tells you who the user is.
What OIDC Adds
| Feature | OAuth 2.0 | OIDC |
|---|---|---|
| Authentication | Not defined | Standardized via ID Token |
| User identity | Not defined | sub claim, UserInfo endpoint |
| Discovery | Not defined | .well-known/openid-configuration |
| Key verification | Not defined | JWKS endpoint |
| Standard scopes | Not defined | openid, profile, email, phone, address |
The ID Token
OIDC introduces the ID Token — a JWT that cryptographically asserts the user's identity. It includes:
sub— Subject identifier (unique user ID).human_guid— SingleSign's unique user identifier (same value assub).iss— Issuer (SingleSign).aud— Audience (yourclient_id).iat— Issued-at timestamp.exp— Expiration timestamp.- Additional claims based on the requested scopes.
{
"iss": "https://api.singlesign.com",
"sub": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"human_guid": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"aud": "your-client-id",
"iat": 1739996400,
"exp": 1740000000,
"name": "Jane Doe",
"email": "jane@example.com",
"email_verified": true
}
What SingleSign Implements
SingleSign provides a complete OIDC-compliant authorization server:
Endpoints
| Endpoint | Purpose |
|---|---|
Discovery (/.well-known/openid-configuration) | Auto-discovery of all endpoints and capabilities. |
Authorize (/oauth/authorize) | Start the authorization flow. |
Token (/oauth/token) | Exchange codes for tokens; refresh tokens. |
UserInfo (/oauth/userinfo) | Retrieve user profile claims. |
JWKS (/oauth/jwks) | Public keys for token signature verification. |
Introspect (/oauth/introspect) | Validate token status and claims (confidential clients). |
Revoke (/oauth/revoke) | Revoke an access or refresh token. |
Supported Features
- Authorization Code flow — The recommended and only supported grant type for user authentication.
- PKCE (S256) — Required for public clients, recommended for all clients.
- Token signing — JWTs are signed with HS512 (HMAC-SHA-512).
- Refresh tokens — Available when the
offline_accessscope is requested. - OpenID Connect Discovery — Dynamic endpoint and capability discovery.
- Token introspection — RFC 7662-compliant token validation.
- Token revocation — RFC 7009-compliant token revocation.
Platform GUID
All SingleSign endpoints require a platform_guid query parameter that identifies your platform. This allows SingleSign to serve multiple isolated platforms from the same infrastructure.
https://api.singlesign.com/oauth/authorize?platform_guid=YOUR_PLATFORM_GUID&...
Discovery
The OpenID Connect Discovery endpoint lets your application automatically find all endpoints and supported features:
curl "https://api.singlesign.com/.well-known/openid-configuration?platform_guid=YOUR_PLATFORM_GUID"
Example response:
{
"issuer": "https://api.singlesign.com",
"authorization_endpoint": "https://api.singlesign.com/oauth/authorize",
"token_endpoint": "https://api.singlesign.com/oauth/token",
"userinfo_endpoint": "https://api.singlesign.com/oauth/userinfo",
"jwks_uri": "https://api.singlesign.com/oauth/jwks",
"introspection_endpoint": "https://api.singlesign.com/oauth/introspect",
"revocation_endpoint": "https://api.singlesign.com/oauth/revoke",
"scopes_supported": ["openid", "profile", "email", "phone", "address", "offline_access"],
"response_types_supported": ["code"],
"grant_types_supported": ["authorization_code", "refresh_token"],
"code_challenge_methods_supported": ["S256"],
"token_endpoint_auth_methods_supported": ["client_secret_basic", "client_secret_post", "none"],
"id_token_signing_alg_values_supported": ["HS512"],
"subject_types_supported": ["public"]
}
Use this response to configure your client dynamically instead of hard-coding endpoint URLs.
JWKS — Key Verification
The JSON Web Key Set (JWKS) endpoint provides the public keys used to verify token signatures:
curl "https://api.singlesign.com/oauth/jwks?platform_guid=YOUR_PLATFORM_GUID"
Libraries like jose (JavaScript), PyJWT (Python), or java-jwt (Java) can fetch and cache these keys automatically.
Next Steps
- PKCE — Understand the Proof Key for Code Exchange mechanism.
- Tokens & Claims — Decode and verify your JWTs.
- Endpoint Reference — Full API documentation.
- Quickstart Guide — Build your first integration.
Last updated: 2026-02-16
Related docs
- SingleSign Developer DocumentationLearn how to integrate SingleSign identity and authentication into your applications using OAuth 2.0 and OpenID Connect.
- Firebase Auth comparisonSingleSign vs Firebase Authentication on lock-in, portability and consent, plus the cases where staying on Firebase is right.
- Secure sign-in for every platform.SingleSign is a free identity provider with OAuth 2.0 and OpenID Connect for developers, and per-app consent and instant revocation for everyone signing in.
- Auth0 comparisonSingleSign vs Auth0 compared on the difference that matters: who owns the account. A side-by-side table, then the three cases where each one is the right call.
- SaaS single sign-onSSO for SaaS applications using OAuth 2.0 and OpenID Connect: the flow to pick, the scopes to request, and a working integration path with SingleSign.
- Identity provider features, in fullThe identity provider features SingleSign ships: OAuth 2.0 and OpenID Connect endpoints, PKCE, scopes and consent, MFA, and instant revocation.
- SingleSign pricingSingleSign pricing in one line: sign-in is free, with no monthly-active-user meter. See exactly what is included, and what SingleSign Mail costs for businesses.
- Google Sign-In alternativeSingleSign vs Google Sign-In: the same one-tap convenience, without an advertising business behind the identity.
- alternative to Auth0Auth0 alternatives compared, plus the part most listicles skip: what migrating off Auth0 actually involves, which code changes, and which does not.
- Firebase Authentication alternativesFirebase Authentication alternatives for teams leaving Google Cloud or wanting a standalone OIDC provider. Comparison table, then the real migration path.
- Identity provider alternativesIdentity provider alternatives, by the provider you are leaving: what actually has to change in your code, and what does not.
- Okta comparisonSingleSign vs Okta: Okta is built for workforce identity inside a company, SingleSign for consumer sign-in across applications.