A sample Angular application demonstrating the first-party @logto/angular v2 SDK with browser rendering, hydration, and SSR.
The sample covers:
- Angular provider and Signal-based authentication state
- A dedicated
/callbackroute - Sign-in and sign-out redirects
- Userinfo and ID-token claims
- Multiple API resources and organization token claims
- SSR-safe post-render callback handling
Update the endpoint, app ID, API resources, and scopes in src/app/logto.config.ts. The v2 SDK accepts multiple resources through the resources array.
Register these redirect URIs in the Logto Console:
- Sign-in redirect URI:
http://localhost:4200/callback - Post sign-out redirect URI:
http://localhost:4200
If you want to request an organization token, enter an organization ID in the running sample. The urn:logto:scope:organizations scope is included by UserScope.Organizations.
This project is excluded from the workspace. Install its dependencies separately:
pnpm install --ignore-workspaceThe sample depends on @logto/angular v2.
pnpm startOpen http://localhost:4200/.
pnpm buildServe the generated SSR application with:
pnpm serve:ssr:@logto/angular-samplepnpm test --watch=false --browsers=ChromeHeadless