👉 Master your Security+ skills with Pluralsight here: Pluralsight
You’ll learn what OpenID Connect (OIDC) is, how it adds authentication to OAuth 2.0, and how it supports single sign-on (SSO). Understand ID tokens versus access tokens so you can distinguish identity from permissions and strengthen your CompTIA Security+ foundation.
Chapters: 0:00 Intro 0:14 What does OpenID Connect add to OAuth? 1:01 How does an OIDC login work? 2:07 What’s the difference between ID tokens and access tokens? 3:20 How does OIDC support single sign-on securely? 4:28 Outro
Affiliate notice: Some links may earn a commission. Thanks for your support.
Key Takeaways
OIDC adds authentication to OAuth 2.0: it verifies who signed in, while OAuth governs authorized access to resources. Signing in does not automatically grant API permissions.
Tokens serve different purposes: ID tokens communicate authentication information to the application; access tokens authorize resource access; refresh tokens obtain new access tokens when permitted.
Authorization Code Flow with PKCE protects code redemption. The openid scope requests OIDC authentication, and the application exchanges the returned code for tokens without receiving the user’s provider password.
Validate ID tokens before creating a session: check the signature, issuer, audience, expiration, and applicable transaction protections. Decoding a JWT does not establish trust, and signing does not encrypt its contents.
OIDC enables SSO through a shared identity provider, not a universal application session. Each application validates its own authentication result; logging out of one may leave others signed in.
Secure implementation and provider accounts remain essential: use strict redirect matching, appropriate state and nonce checks, PKCE, and preferably phishing-resistant MFA. Follow the IETF’s OAuth security best practices.
👉 Turn IAM concepts into hands-on skills with Pluralsight, an optional next step offering guided security labs, feedback, assessments, and certification practice exams.
What Is OpenID Connect (OIDC)?
OpenID Connect (OIDC) is an authentication protocol built on top of OAuth 2.0. It lets an application verify who signed in by relying on authentication performed by a trusted identity provider.
If you have used a “Sign in with Google” button, you have encountered the kind of sign-in experience OIDC supports. Instead of asking you to create another password, the application directs you to a provider that authenticates you. The application then validates the identity information it receives before signing you in.
Some links may earn a commission. Thanks for your support.
Watch in the video playerOpen the dedicated player for this video.
Authorization: What access is allowed?
OIDC adds standardized authentication information to OAuth 2.0’s authorization framework. They work together, but they are not interchangeable.
OIDC vs. OAuth 2.0: Identity Is Not Permission
OAuth 2.0 provides mechanisms for granting limited access to protected resources. For example, a scheduling application might request permission to read your calendar.
That permission does not, by itself, provide a standardized answer to “Which user authenticated to this application?” OIDC supplies that identity layer, principally through an ID token.
Question
Relevant mechanism
Who authenticated to this application?
OIDC authentication and a validated ID token
May this application read a calendar?
OAuth authorization and an appropriate access token
Can a user access several apps without repeatedly authenticating?
SSO supported by federation, which can use OIDC
An application may need both identity and API access. A scheduling tool, for instance, could use OIDC to sign you in and OAuth access tokens to call a calendar API.
Signing in does not automatically grant access to calendars, files, or messages. Those resources require the applicable authorization.
Three roles are central to understanding an OIDC transaction:
Participant
What it does
Example
End user
The person signing in
A student accessing a learning portal
Client or relying party (RP)
Relies on the provider’s authentication result
The learning portal
OpenID Provider (OP)
Authenticates the user and issues identity information
Google or an organization’s identity service
An OpenID Provider is a type of identity provider, often abbreviated IdP.
The browser carries the user between the application and provider. If the application also calls a protected API, that API acts as a resource server.
This arrangement is an example of federation: one system trusts authentication information supplied by another system rather than checking the user’s password itself.
How Does an OIDC Login Work?
Consider a learning portal offering “Sign in with Google.” A modern starting point is the Authorization Code Flow with PKCE.
1. The application redirects you to the provider
When you select the sign-in button, the portal directs your browser to the provider’s authorization endpoint.
The request includes information such as:
client_id: Identifies the application.
redirect_uri: Specifies the registered callback address.
response_type=code: Requests an authorization code.
A PKCE code challenge: Helps bind code redemption to this transaction.
A scope describes requested access or identity information. The openid scope is what makes this an OIDC request rather than simply an OAuth authorization request.
2. The provider authenticates you
The provider may ask you to sign in and complete multifactor authentication. If you already have an eligible provider session, it may reuse that session instead.
The learning portal does not receive your Google password in this flow. You authenticate with the provider, and the portal receives an authentication result.
3. The provider returns an authorization code
The provider sends your browser back to the portal’s registered callback address with a temporary authorization code.
That code is not the ID token. The application must exchange it at the provider’s token endpoint.
4. The application exchanges the code for tokens
The application submits the authorization code and its PKCE verifier. A confidential client also authenticates as required by its configuration.
PKCE, short for Proof Key for Code Exchange and pronounced “pixy,” connects code redemption to a transaction-specific secret called the code verifier. Someone who intercepts the code should not be able to redeem it without the matching verifier.
The token response includes an ID token and an access token. A refresh token may also be issued when permitted.
5. The application validates the identity result
Receiving a token is not enough. Before trusting the ID token, the application must validate its signature, issuer, audience, expiration, and applicable transaction checks.
Only after successful validation should it establish its own signed-in session.
These tokens have different jobs and must not be treated as interchangeable.
Token
Main purpose
Where it is used
ID token
Communicates information about authentication and the user
Validated by the client application
Access token
Enables authorized access to a protected resource
Presented to an API or resource server
Refresh token
Obtains new access tokens when permitted
Sent to the authorization server’s token endpoint
A useful mental model is:
The ID token tells the application about the sign-in. The access token is used to access an authorized resource.
An API should not accept an ID token merely because it resembles an access token. Even if both happen to use the same token format, their purposes and validation rules differ.
What Is Inside an ID Token?
An ID token is a JSON Web Token (JWT). It contains claims, named statements about the authentication and subject.
Common claims include:
Claim
Meaning
iss
The issuer that created the token
sub
The subject identifier within that issuer’s context
aud
The intended audience, such as the client application
exp
The token’s expiration time
iat
The time the token was issued
A commonly encountered signed JWT has three dot-separated parts:
header.payload.signature
Signed does not mean encrypted. The contents of an ordinary signed JWT can generally be decoded by someone who has the token. Its signature provides integrity and authenticity only when correctly validated.
Likewise, decoding a token does not prove it is trustworthy.
Applications should also avoid using an email address as a permanent account identifier. Email addresses can change; the subject identifier must be understood in the context of its issuer.
Scopes and Claims Are Different
A scope requests access or identity information. A claim is a statement returned in a token or another identity response.
Common OIDC scopes include:
openid: Requests OIDC authentication.
profile: Requests basic profile information.
email: Requests email-related information.
offline_access: Requests access when the user is not actively present, typically involving refresh tokens.
Requesting a scope does not guarantee that every associated attribute will be returned. Provider policy and available account information still matter.
How OIDC Supports Single Sign-On
Single sign-on (SSO) lets users access multiple participating applications without repeatedly authenticating.
Imagine signing in to an organization’s identity provider through an expense application. Later, you open its training portal. The training portal sends you to the same provider, which may reuse your existing authentication session.
However, the training portal still needs to receive and validate its own authentication result.
The distinction is important:
Federation is the trust arrangement between the application and provider.
OIDC is a protocol that can carry the authentication information.
SSO is the resulting sign-in experience across participating applications.
Applications do not simply share one universal application cookie. Each application can maintain its own session, separate from the provider’s session.
For the same reason, logging out of one application does not necessarily log you out of every other application or the identity provider.
OIDC Security Risks and Protective Controls
OIDC provides a standardized approach to authentication, but security still depends on correct implementation and strong provider authentication.
Validate Tokens, Not Just Their Contents
A client must confirm that an ID token:
Has a valid signature using an acceptable algorithm and trusted verification key.
Comes from the expected issuer.
Is intended for that client.
Has not expired.
Passes applicable transaction checks, including nonce validation when used.
Accepting a readable token without validation can allow an attacker to supply identity information the application should reject.
Protect Redirects and Authorization Transactions
Strict callback-address matching helps prevent authorization responses from being sent to an attacker-controlled destination.
PKCE protects authorization-code redemption. Other transaction protections have related but distinct roles:
Mechanism
Primary role
state
Correlates the response with the initiating browser transaction; commonly used for CSRF protection
These are not interchangeable names for the same control. A maintained OIDC library helps implement the checks required by the chosen flow.
Secure the Provider Account
Centralized sign-in reduces the need for separate passwords, but it also concentrates risk. A compromised provider account can affect several connected services.
Strong authentication, ideally phishing-resistant MFA, helps protect that central account. Applications should also request only the permissions and identity attributes they actually need.
OIDC itself does not require every provider to use the same authentication method. The strength of the sign-in still depends on the provider’s methods and policies.
How OIDC Fits Into Security+ Study
For cybersecurity and CompTIA Security+ learners, OIDC helps connect several identity and access management concepts:
Authentication establishes who signed in.
Authorization controls permitted access.
Federation lets an application trust another provider’s authentication.
SSO reduces repeated authentication across participating applications.
OIDC is not the same as SAML or LDAP. SAML is another federation standard, commonly associated with XML assertions, while OIDC uses JWT identity tokens. LDAP provides access to directory services rather than an equivalent browser-based federation flow.
Understanding these boundaries makes real-world login systems easier to reason about: identify who authenticates the user, which application trusts the result, and which token serves which purpose.
Put Identity and Access Concepts Into Practice
Following a sign-in flow on paper is a useful foundation. Applying the distinctions between authentication, authorization, tokens, and sessions is the next step.
An optional cybersecurity training platform can add guided labs, feedback, assessments, and practice exams to help you find gaps and focus your certification preparation.
👉 Explore Pluralsight to practice in guided security labs, check your understanding, and plan your next study session.
Affiliate notice: Some links may earn a commission. Thanks for your support.
What Is LDAP and How Does It Work? (Explained Clearly) - Authentication Basics
Next
FAQ
Quick answers to the questions people usually ask about this topic.
Does OpenID Connect support passwordless login and passkeys?
Yes. OIDC does not dictate how the identity provider authenticates users, so a provider can support passkeys, passwords, MFA, or other methods. The application receives and validates the OIDC authentication result rather than handling the user's sign-in credentials. Using OIDC alone does not guarantee passwordless or phishing-resistant authentication.
What happens to OIDC login if the identity provider goes offline?
New sign-ins that require the provider will generally fail until it becomes available again. Users with an existing application session may remain signed in, depending on the application's session policies and whether it needs to contact the provider. Token refresh and other provider-dependent operations can also be disrupted.
Does an expired ID token automatically log a user out?
Not necessarily. An application must check the ID token's expiration when validating it, but the application session it establishes has its own lifetime. Expiration of the ID token does not automatically terminate that session. Applications need explicit session-expiration and reauthentication policies.
Can OIDC determine whether a user is an administrator?
OIDC establishes identity; it does not automatically define application permissions. A provider may supply role or group claims, but the application must explicitly trust and interpret those claims and enforce its own authorization rules. Successfully signing in is not, by itself, permission to access administrative features.
Can single-page applications and mobile apps use OIDC securely?
Yes. Authorization Code Flow with PKCE is a modern starting point for these applications. Browser-only and mobile clients cannot reliably keep an embedded client secret confidential, so they must not rely on one as proof of identity. Secure redirect handling, appropriate token storage, and a maintained OIDC library remain important; see the IETF's OAuth security best practices.
Does signing out of an OIDC application revoke its access to my data?
Not necessarily. Signing out usually ends an application session, while revoking authorization addresses the application's ongoing permission to access protected resources. Depending on the provider, you may need to remove the application from your connected-app settings or revoke its authorization separately. Logout should not be assumed to invalidate every access token or refresh token.
How can I practice OIDC-related concepts for CompTIA Security+?
Start by tracing a sign-in scenario: identify the identity provider, relying party, authentication result, API permissions, and separate application sessions. Then test whether you can distinguish authentication failures from authorization failures. For guided cybersecurity labs, feedback, assessments, and certification practice resources, explore Pluralsight as an optional next step to apply your foundations and identify study gaps.
Affiliate link — I may earn a commission at no additional cost to you.
Jay's Recommendation
Turn understanding into hands-on confidence
You've built the foundations. Pluralsight adds opportunities to practice in guided security labs, get feedback, and check your knowledge with assessments and practice exams, so your next step is more than another video.
🛠Put concepts to workBuild practical skills with guided security labs and feedback.
🎯Find your weak spotsUse assessments to focus on what needs more work.
📝Check your understandingUse practice exams to guide your certification preparation.
🧭Give study sessions directionOrganize further learning with curated paths and progress tracking.