How xstring-tech/xst-authentication-api works
This repository is a Node.js example CCS that delegates passwordless sign-in to xString Tech’s hosted authentication service. A user starts sign-in at the CCS, which submits an Authentication Notice of Intent and redirects the browser to hosted authentication. On return, the CCS exchanges the code, verifies the ID Token, establishes a signed session, and serves a protected portal; logout clears that session. The README also describes compatible authenticator apps and a language-agnostic API. The PHP integration is present in the tree, but its behavior is not represented because its source was not sampled.
Main entry points: server.js Sign-in Initiation
Components 14
CCS Web Application
- CCS Landing Page
server.js - Sign-in Initiation
server.js - Code Exchange
server.js - ID Token Verification
server.js
Hosted Authentication
- SaaS Authentication API
- Hosted Authentication
- JWKS Endpoint
Session and Portal
- Signed Session Cookie
server.js - Protected Portal
server.js - Logout Handling
server.js - Logout Confirmation
server.js
Other components
- End User
- User Browser
- Authenticator App
Connections 19
- End User → User Browser: uses
README.md - User Browser → CCS Landing Page: opens
README.md - CCS Landing Page → Sign-in Initiation: starts sign-in
README.md - Sign-in Initiation → SaaS Authentication API: submits ANoI
server.js - Sign-in Initiation → Hosted Authentication: redirects browser
server.js - User Browser → Hosted Authentication: completes authentication
README.md - End User → Authenticator App: approves request
README.md - Hosted Authentication → User Browser: returns code and state
README.md - User Browser → Code Exchange: returns code
README.md - Code Exchange → SaaS Authentication API: exchanges code
server.js - Code Exchange → ID Token Verification: passes ID Token
README.md - ID Token Verification → JWKS Endpoint: fetches public keys
server.js - ID Token Verification → Signed Session Cookie: establishes session
README.md - User Browser → Protected Portal: requests portal
server.js - Protected Portal → Signed Session Cookie: checks session
server.js - User Browser → Logout Handling: submits logout
server.js - Logout Handling → Signed Session Cookie: clears cookie
server.js - Logout Handling → Logout Confirmation: redirects to
server.js - User Browser → Logout Confirmation: views confirmation
server.js