New Library Version: Authentication and Authorization for Angular with OAuth 2 and OIDC

In the last days, I've updated my lib that allows to use OAuth 2 and OpenId Connect (OIDC) together with Angular 2 to implement modern auth scenarios. In order to align with the new naming conventions (#JustAngular) it is called angular-oauth2-oidc now. It can be downloaded via npm. Same examples showing how to use it can be found in the npm repository. The next sections describe the new features.

Password Flow

The new version not only supports the implicit flow which redirects the user to the auth server for logging in, but also the password flow. This flow demands the users to enter their credentials into the client. The client in turn can exchange them for an access token. Although this undermines the ideas of OAuth 2 in some way, it is a popular approach for business applications where users don't have a problem with entrusting the client with their passwords.

Discovery Document

To simplify the configuration of the library it can now read the discovery document that is described by OIDC.

Refresh Tokens

The new version can also use refresh tokens to fetch a new access token, for instance after it expired. Using this approach sliding expiration can be implemented. It is important to note that the implicit flow doesn't allow for refresh tokens by design. Therefore, the lib only supports refresh tokens when using the password flow.

Querying the userinfo endpoint

OIDC also defines a userinfo endpoint that returns some information about the current user. As the password flow does not support issuing an identity token, this endpoint can be used instead.

Further information


Sie wollen mehr zum Thema New Library Version: Authentication and Authorization for Angular with OAuth 2 and OIDC wissen? Hier können Sie eine Anfrage für eine unverbindliche Schulung ode Beratung bzw. einen Workshop erstellen.
Unverbindliche Anfrage

Schulung und Beratung


Datenbindung, Formulare, Validierung, Routing, HTTP, Komponenten, ...


Angular: Advanced

Erweiterte Aspekte von Angular


Reaktive Architekturen mit Angular und Redux

Dieses interaktive Seminar vermittelt, wie Sie reaktive Anwendungen mit Angular entwickeln können.


Migration von AngularJS 1.x auf Angular (2+)

Bestehende Projekte auf Angular 2 migrieren, ngUpgrade, ...


Angular Review

Feedback und klärung offener Fragen, weiterführende Themen


Angular Workshop

Start ohne Umwege


Weitere Schulungen ...