OpenID Connect#
What Is The OpenID Connect?#
OpenID Connect (OIDC)is an open authentication protocol that works on top of the OAuth 2.0 framework. Targeted toward consumers, OIDC allows individuals to use single sign-on (SSO) to access relying party sites using OpenID Providers (OPs), such as an email provider or social network, to authenticate their identities. It provides the application or service with information about the user, the context of their authentication, and access to their profile information.- While OAuth 2.0 provides authorization via an access token containing scopes, OpenID Connect provides authentication by introducing a new ID token contains a new set of scopes and claims specifically for identity.
- The
OpenID Connectflow looks the same as OAuth. The only differences are, in the initial request, a specific scope ofOpenIDis used and in the final exchange theclientreceives bothAccess Tokenand anID Token. - The
Access Tokenwill be used to handle theAuthorizationand theID tokenwill be used to handle theuser detailsof the authentication details. - So to make the authorization server know that you want to use the
OAuth2orOpenID Connect, we just need to put the valueopenIdinto thescopethen the authorization server will know and return theAccess TokenandID Tokenfor us.
Why Is OpenID Connect Important?#
Identityis the key to any application. At the core of modern authorization is OAuth2, but the OAuth2 lacks an authentication component. ImplementingOpenID Connecton top of OAuth2 completes an IAM (Identity And Access Management) strategy.- As more and more applications need to connect with each other and more identities are being populated on the internet, the demand to share these identities is also increased. With
OpenID Connect, applications can share the identities easily and standard way.
-
OpenID Connectadd below details toOAuth2:- OIDC standardizes the scopes to OpenID, profile, email and address
- ID Token using JWT standard
- OIDC exposes the standardized
/userinfoendpoint.
-
So in the
OpenID Connect, with theAccess TokenandID Token, we can identify the identity details of our end user and also can enforce the access management with a combination of these identity and access management. - Currently inside the industry authorization server like
Okta,Keycloakthey are all implemented based on this IAM concept and they follow theOpenID Connectand the OAuth2 framework.

