Skip to content

Latest commit

 

History

History

auth_samples_angular

README.md

Tuurio Auth Angular Demo

An Angular demo that signs in with OAuth 2.0 / OpenID Connect, then displays token contents and a logout button.

Integration guide

Setup

  1. Install dependencies:
npm install
  1. Create your local config:
cp .env.example .env
  1. Update .env with your tenant values from:
https://<tenantId>.id.tuurio.com/admin/clients
  1. Start dev server:
npm start

Open http://localhost:4200.

npm start and npm run build automatically generate src/app/auth/auth.config.generated.ts from .env.

Required client URLs

Configure your Tuurio client with these redirect URLs (matching your .env values):

Redirect URI: http://localhost:4200/auth/callback
Post-logout Redirect URI: http://localhost:4200/logout/callback

The demo also accepts /callback for compatibility.

.env keys

TUURIO_ISSUER=https://YOUR_TENANT.id.tuurio.com
TUURIO_CLIENT_ID=YOUR_CLIENT_ID
TUURIO_REDIRECT_URI=http://localhost:4200/auth/callback
TUURIO_POST_LOGOUT_REDIRECT_URI=http://localhost:4200/logout/callback
TUURIO_SCOPE=openid profile email

Notes:

  • This is a public SPA client. Do not use or commit confidential client secrets.
  • Keep redirect URIs and post-logout URIs exact.