A library for adding OAuth 2 and OpenID Connect (OIDC) authentication to Angular applications.
angular-oauth2-oidc is a library that enables OAuth 2 and OpenID Connect (OIDC) authentication in Angular applications. It handles secure login flows, token management, and integration with identity providers, solving the complexity of implementing authentication in single-page applications. The library supports modern standards like PKCE and is compatible with a wide range of Angular versions and identity servers.
Angular developers building single-page applications that require secure user authentication with OAuth 2 or OpenID Connect. It is particularly useful for teams integrating with identity providers like Auth0, Keycloak, IdentityServer, or Azure AD.
Developers choose angular-oauth2-oidc for its comprehensive feature set, security focus, and ease of integration. It reduces authentication boilerplate, supports modern best practices like PKCE, and is actively maintained with compatibility across Angular versions and major identity providers.
Support for OAuth 2 and OpenId Connect (OIDC) in Angular.
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Supports Code Flow with PKCE, aligning with OAuth 2.1 security best practices for secure authentication in SPAs, as highlighted in the library's philosophy and features.
Handles token refresh, expiration, and revocation automatically, reducing boilerplate code, with features like automatic token refresh before expiry documented in the README.
Utilizes discovery documents to fetch provider settings automatically, simplifying setup through methods like loadDiscoveryDocumentAndTryLogin().
Tested with Angular versions 4.3 to 20 and major identity providers like IdentityServer, Keycloak, Auth0, and Azure AD, ensuring wide applicability.
Version 9 introduced breaking changes, such as moving JwksValidationHandler to a separate library, requiring additional installation and code adjustments, as warned in the README.
Lacks pre-styled login forms or UI components, forcing developers to implement custom frontend interfaces for authentication flows, as evidenced by the focus on configuration examples without UI.
Initial setup can be intricate, requiring deep understanding of OAuth/OIDC parameters like responseType and scopes, as shown in the detailed configuration snippets.