ngx-oauth

July 4, 2026 · View on GitHub

OAuth 2.1 library for Angular 22. Zoneless, signal-based.

Projects

  • projects/ngx-oauth/ — the library
  • projects/ngx-oauth-sample/ — demo app

Commands

CommandDescription
npm run build:libBuild the library
npm run build:appBuild the demo app
npm startServe demo (https://localhost:3000, SSL enabled)
npm testRun library tests (Vitest)
npm run lintLint both projects
npm run formatFormat code

Configure the demo

Edit projects/ngx-oauth-sample/src/app/app.config.ts:

const oauthConfig = {
  config: {
    // autodiscovery
    issuerPath: 'https://your-idp.com/realms/realm',
    clientId: 'your-client-id',

    // or manual endpoints
    // authorizePath: '/authorize',
    // tokenPath: '/token',
    // clientId: 'your-client-id',

    scope: 'openid profile email',
    pkce: true
  }
}

Library Usage

See ngx-oauth/README.md for the full library documentation.

License

MIT