How damienbod/angular-auth-oidc-client works
This repository is an Angular OpenID Connect/OAuth2 client library. An Angular application supplies provider configuration and calls the public security service; the library processes login redirects, validates the response, exposes authentication/user state, and can attach access tokens to protected HTTP requests. Separate branches cover login variants, renewal and session management, logout/revocation, and configuration discovery. The README documents these capabilities; sampled sources confirm key check-auth, guard, renewal, iframe, and persistence relationships. Several feature links use tree-supported paths because their implementations were not sampled.
Main entry points: oidc.security.service.ts Security service · check-auth.service.ts Authentication check · storage-persistence.service.ts Persistence layer · refresh-session.service.ts Token renewal
Components 24
Setup and configuration
- Configuration
projects/angular-auth-oidc-client/src/lib/config/config.service.ts - Provider discovery
projects/angular-auth-oidc-client/src/lib/config/auth-well-known/auth-well-known.service.ts
Authentication flows
- Login dispatch
projects/angular-auth-oidc-client/src/lib/login/login.service.ts - Code and implicit
projects/angular-auth-oidc-client/src/lib/login/standard/standard-login.service.ts - Pushed requests
projects/angular-auth-oidc-client/src/lib/login/par/par-login.service.ts - Popup login
projects/angular-auth-oidc-client/src/lib/login/popup/popup-login.service.ts - Callback processing
projects/angular-auth-oidc-client/src/lib/callback/callback.service.ts - Flow handlers
projects/angular-auth-oidc-client/src/lib/flows/callback-handling - Logout and revoke
projects/angular-auth-oidc-client/src/lib/logoff-revoke/logoff-revocation.service.ts
Session and state
- Token validation
projects/angular-auth-oidc-client/src/lib/validation/token-validation.service.ts - Authentication check
projects/angular-auth-oidc-client/src/lib/auth-state/check-auth.service.ts - Auth state
projects/angular-auth-oidc-client/src/lib/auth-state/auth-state.service.ts - User data
projects/angular-auth-oidc-client/src/lib/user-data/user.service.ts - Persistence layer
projects/angular-auth-oidc-client/src/lib/storage/storage-persistence.service.ts - Browser storage
projects/angular-auth-oidc-client/src/lib/storage/browser-storage.service.ts - Token renewal
projects/angular-auth-oidc-client/src/lib/callback/refresh-session.service.ts - Session iframe
projects/angular-auth-oidc-client/src/lib/iframe/check-session.service.ts
App integration
- Security service
projects/angular-auth-oidc-client/src/lib/oidc.security.service.ts - HTTP interceptor
projects/angular-auth-oidc-client/src/lib/interceptor/auth.interceptor.ts - Public events
projects/angular-auth-oidc-client/src/lib/public-events/public-events.service.ts
Other components
- Angular app
- OIDC provider
- Protected API
- Browser storage
Connections 36
- Angular app → Configuration: supplies config
- Angular app → Security service: calls
- Security service → Authentication check: checks auth
- Security service → Login dispatch: starts login
- Security service → Token renewal: renews tokens
- Security service → Logout and revoke: logs off
- Configuration → Provider discovery: loads metadata
- Provider discovery → OIDC provider: requests metadata
- Login dispatch → Code and implicit: dispatches
- Login dispatch → Pushed requests: dispatches PAR
- Login dispatch → Popup login: dispatches popup
- Code and implicit → OIDC provider: redirects for login
- Pushed requests → OIDC provider: submits request
- Popup login → OIDC provider: opens authorization
- Authentication check → Callback processing: processes callback
- Callback processing → Flow handlers: dispatches flow
- Flow handlers → Token validation: validates tokens
- Authentication check → Auth state: checks tokens
- Authentication check → User data: publishes user
- Authentication check → Session iframe: starts session checks
- Authentication check → Token renewal: renews when needed
- Auth state → Persistence layer: reads auth tokens
- User data → Persistence layer: reads user data
- Token renewal → Provider discovery: loads endpoints
- Token renewal → OIDC provider: requests token refresh
- Token renewal → Persistence layer: persists renewal state
- Session iframe → OIDC provider: checks session
- Session iframe → Persistence layer: reads session state
- Persistence layer → Browser storage: reads and writes
- Browser storage → Browser storage: persists data
- Security service → Public events: publishes events
- Angular app → HTTP interceptor: configures interceptor
- HTTP interceptor → Security service: gets access token
- HTTP interceptor → Protected API: adds bearer token
- Logout and revoke → OIDC provider: ends session
- Logout and revoke → Persistence layer: clears auth data