Skip to main content

OAuth and OIDC basics

Core concepts and terminology​

OAuth 2.0, OAuth 2.1, referred to here as OAuth (Open Authorization), and OIDC (OpenID Connect) are open standards for authorization and authentication. They are the foundation for secure access across APIs, web, and mobile apps, enabling delegated and passwordless access.

OAuth authorization framework​

OAuth lets a user (resource owner) grant a client application limited access to their resources without sharing passwords. For example, a user can allow Slack to read their Google Calendar without giving Slack their Google password. OAuth 2.1 builds on OAuth 2.0 by removing insecure features and formalizing best practices. References to OAuth in this document apply to OAuth 2.1 unless otherwise noted.

Key roles​

RoleDescription
Resource OwnerThe user who owns the data or resource.
ClientThe app requesting access on behalf of the user.
Authorization ServerIssues tokens after authenticating the user and client. IDaaS is the Authorization Server.
Resource ServerAPI or service that validates tokens and provides data. IDaaS issues tokens used by the Resource Server

Key security features​

Key security features include the following. These can be used together or separately to enhance the security of OAuth 2.0 clients and authorization flows.

  • JAR (JWT-Secured Authorization Requests)
  • PAR (Pushed Authorization Requests)
  • DPoP (Demonstrating Proof of Possession)
  • OAuth 2.0 Issuer Identification (RFC 9207)
  • Elliptic Curve (EC) keys and PS/EC signing algorithms

The following is an example flow of these features used together.

Client Authorization Server Resource Server
| | |
|-- (1) PAR POST /par ----------------> | ← back-channel, client-auth |
| (body contains JAR request obj) | validates signature (JAR) |
|<-- request_uri ---------------------- | |
| | |
|-- (2) GET /authorize?request_uri ---> | ← browser redirect |
|<-- code + iss (RFC 9207) ------------ | ← client verifies iss |
| | |
|-- (3) POST /token (+ DPoP proof) ---> | ← back-channel |
|<-- DPoP-bound access token ---------- | |
| (signed using ES256) | |
| | |
|-- (4) GET /api (+ DPoP proof) --------------------------------------> |
|<-- protected resource ----------------------------------------------- |

The following table summarizes the key security features and the threats they protect against. For more details, see OAuth and OIDC enhanced security features.

SpecProtects againstLayer
JARParameter tampering, request forgeryAuthorization request integrity
PARURL leakage, unauthenticated requests, open redirectsAuthorization request confidentiality & authentication
DPoPToken theft, replay attacksToken binding
RFC 9207Mix-up attacks, cross-AS code theftAuthorization response binding
EC KeysWeak signing algorithmsToken strength

Grant types​

Grants describe how clients obtain tokens.

Grant TypeDescriptionCommon Use Case
Authorization CodeExchanges an authorization code for tokens after user consent.Web and backend apps (secure, server-side).
Authorization Code with PKCE (Proof Key for Code Exchange)Variant of Authorization Code for public clients (no client secret).Mobile apps and SPAs.
Client CredentialsDirect app-to-app authorization without user interaction.Service APIs, microservices, M2M.
Refresh TokenObtains new access tokens without user re-login.Long-lived sessions.
Device CodeLets devices without browsers perform user login.TVs, IoT devices.
JWT IDaaSAn API-based variant of Authorization Code.Web and backend apps, Mobile apps, and SPAs.

Flow types​

Different app architectures use specific OAuth flows.

Flow TypeDescriptionUsed ByPARJARDPoP
Authorization Code FlowClient redirects user to Authorization Server → gets code → exchanges for tokens.Web apps (secure backend).yesyesyes
Authorization Code Flow with PKCEAdds PKCE challenge/verifier to protect public clients from interception.Mobile and SPA apps.yesyesyes
Implicit Flow (OAuth 2.0 only)Tokens returned directly via browser redirect (no code exchange).Deprecated, formerly SPAs.nonono
Client Credentials FlowNo user; client authenticates directly for API access.Daemons, backend services.nonoyes
Device Authorization FlowUser logs in on a separate device to authorize.Smart TVs, consoles, IoT.nonoyes
JWT IDaaS FlowAPI-based variant of Authorization Code providing IDaaS Authentication API capability.Consumer SSO, complex OIDC apps.nonoyes

OIDC authentication layer​

OIDC extends OAuth to add identity authentication. While OAuth grants permission to resources, OIDC identifies the authenticated user to the client application.

Key additions​

OIDC ConceptDescription
ID TokenA JWT that contains verified user identity info (e.g., sub, email, name).
UserInfo EndpointREST endpoint returning user claims.
ScopesAdditions like openid, profile, email, etc.
ClaimsSpecific user attributes included in tokens.

Flow types​

OIDC FlowBased OnDescriptionPARJARDPoP
Authorization Code FlowOAuth Code FlowStandard web app login. Server exchanges code for id_token + access_token.yesyesyes
Authorization Code Flow with PKCEAuthorization Code + PKCESecure for mobile/native apps (no client secret needed).yesyesyes
Implicit FlowOAuth Implicit FlowReturns tokens directly via redirect (legacy).nonono
Authenticated Implicit FlowOAuth Implicit FlowReturns tokens directly via redirect for authenticated requests such as Microsoft EAM (External Authentication Methods).nonono
JWT IDaaS FlowOAuth JWT IDaaS FlowAPI-based login. Provides IDaaS Authentication API capability.nonoyes

OAuth and OIDC authentication layer​

OIDC can also be combined with OAuth to issue id tokens for client applications and access tokens for resource servers. The ID token identifies the authenticated user to the client application, while the access token grants permission to resources.

Key additions​

OIDC ConceptDescription
UserInfo EndpointNot applicable.
ScopesOIDC-based scopes can be associated with OAuth access tokens as well.
ClaimsOIDC-based claims can be added to access tokens as well.

Flow types​

Same as OAuth flow types.

Configuring OIDC applications​

To configure OIDC applications in IDaaS, see the instructions for your application type:

These guides provide step-by-step configuration instructions for authentication methods, token signing, scopes, redirect URIs, and other OIDC settings.


Summary Table​

ConceptOAuthOIDCOAuth/OIDC
PurposeAuthorization by Client Applications to Resource ServersAuthentication of users by Client ApplicationsAuthorization and Authentication
TokensAccess and Refresh for resource serversID, Access, and Refresh for client applicationsID, Access, and Refresh for client applications; Access and Refresh for resource servers
Scopesapi.read, api.writeopenid, profile, emailopenid, profile, email, api.read, api.write
FlowsCode, PKCE, Client Credentials, Device, JWT IDaaSCode, PKCE, Authn Implicit, JWT IDaaSCode, PKCE, Client Credentials, Device, JWT IDaaS
OutputAPI AccessAuthenticated IdentityAPI Access and Authenticated Identity

Use the following pages for detailed implementation and security guidance: