Skip to content

OAuth 2 and OpenId Connect in an angular application using login via Code Flow w.r.t PKCE for user login.

Notifications You must be signed in to change notification settings

hamza-ml/angular-sso

Repository files navigation

Angular SSO using OIDC & OAuth

  1. This project was generated with Angular CLI version 11.0.5.
  2. A simple demonstration of using OAuth 2 and OpenId Connect in Angular.
  3. Login via Code Flow + PKCE (Proof Key for Code Exchange).

Identity Server

  1. Identity Provider
  2. Credentials: Usernme: alice, Password: alice.

Dependencies

Angular OAuth 2 & OIDC Client

npm i angular-oauth2-oidc

Development Server

Run ng serve -o for opening the dev server directly into your browser using default setting, i.e. http://localhost:4200/. The default host and port settings are crucial as the identity server is configured against these.

Basic Flow

  • Route to the login page incase no user is logged in.

home

  • Proceed to the next page after getting response from Identity Provider while making sure (via guard) that valid Id and access tokens are present.

logged_in

Referenced Project

Angular OAuth OIDC

About

OAuth 2 and OpenId Connect in an angular application using login via Code Flow w.r.t PKCE for user login.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published