Angular SDK
Angular service, guard, and callback component for Wocha SPA authentication.
@wocha/angular provides an Angular service, route guard, and callback component for Wocha authentication in single-page applications. Implements OAuth 2.0 authorisation code with PKCE.
Installation
pnpm add @wocha/angularOr scaffold with the CLI
npx @wocha/cli init --framework react-spaPeer dependencies: Angular 17+, @angular/router, RxJS 7+.
Setup
Routes
WochaAuthService
Configuration
| Field | Required | Description |
|---|---|---|
issuer | Yes | OIDC issuer URL |
clientId | Yes | OAuth client ID |
redirectUri | No | Defaults to {origin}/callback |
scopes | No | Default: openid profile email offline_access |
platformApiUrl | No | For permission checks |