Quick Start
UniAuth implements OpenID Connect discovery and authorization endpoints. Official OpenID certification and compatibility with every client are not claimed; test the profile you use.
Point your OIDC library at the discovery URL. It returns the endpoints, scopes, and signing keys advertised by this deployment; metadata alone does not prove every optional profile or endpoint behavior:
https://uniauth.id/.well-known/openid-configurationDiscovery is metadata input only. Verify the exact library version, client authentication, redirects, claims, token handling, logout, and failure behavior before relying on this profile.
What UniAuth Supports
Implemented OIDC Core and security-profile source paths, with documented limitations. See the OIDC Feature Matrix for the reviewed matrix; it is not a complete conformance or interoperability list.
Step 1: Register an Application
Go to the Developer Console and create an OAuth client. You'll get a client_id and a client_secret. Set your redirect URI (e.g.https://yourapp.com/callback).
Step 2: Fetch the Discovery Document
A compatible OIDC library can read this metadata. Inspect the advertised fields and test the exact profile; do not assume every library or endpoint behavior:
$ curl https://uniauth.id/.well-known/openid-configuration | jq
{
"issuer": "https://uniauth.id",
"authorization_endpoint": "https://uniauth.id/api/oauth/authorize",
"token_endpoint": "https://uniauth.id/api/oauth/token",
"userinfo_endpoint": "https://uniauth.id/api/oauth/userinfo",
"jwks_uri": "https://uniauth.id/.well-known/jwks.json",
"end_session_endpoint": "https://uniauth.id/api/oauth/end-session",
"revocation_endpoint": "https://uniauth.id/api/oauth/revoke",
"introspection_endpoint": "https://uniauth.id/api/oauth/introspect",
"registration_endpoint": "https://uniauth.id/api/oauth/register",
"pushed_authorization_request_endpoint": "https://uniauth.id/api/oauth/par",
"backchannel_authentication_endpoint": "https://uniauth.id/api/oauth/backchannel-authenticate",
"scopes_supported": ["openid","profile","email","phone","address","groups"],
"claims_supported": ["sub","email","email_verified","name","groups","trust_tier",...],
"id_token_signing_alg_values_supported": ["RS256","RS384","RS512","PS256","PS384","PS512","ES256"],
"code_challenge_methods_supported": ["S256"],
"subject_types_supported": ["pairwise"]
}Step 3: Authorization-Code Flow Source Example
This source example illustrates one JS SDK path; it is not a complete OIDC profile or interoperability result. Verify the ID token locally — don't round-trip to /userinfo on every request.(/userinfo is the right choice when you need fresh profile data — e.g. after a user updated their avatar or display name — just don't call it in the hot path of every request.)
// Source/API example; public npm availability is not established.
// A deployment-local /sdk/uniauth.esm.js candidate requires exact-byte verification.
import { UniAuth } from '@uniauth/js'
const auth = new UniAuth({
issuer: 'https://uniauth.id', // SDK fetches discovery from issuer
clientId: 'your-client-id',
redirectUri: 'https://yourapp.com/callback',
scopes: ['openid', 'profile', 'email', 'groups'],
postLogoutRedirectUri: 'https://yourapp.com/', // register this exact return URL
})
// 1. Kick off login (PKCE + state + nonce generated automatically)
await auth.login({ mode: 'popup' })
// 2. On the callback page — verifies ID token signature via JWKS,
// checks nonce, exp, iss, aud. No /userinfo call needed.
const tokens = await auth.handleCallback()
// { access_token, id_token, refresh_token, expires_in }
// 3. Decoded + verified ID token claims are cached
const user = auth.getIdTokenClaims()
// { sub, email, email_verified, name, groups, trust_tier, ... }
// 4. Use email_verified for trust decisions
if (!user.email_verified) {
throw new Error('Email not verified — do not grant access')
}
// 5. Use groups for RBAC — NO env-var allowlist needed
if (user.groups?.includes('admin')) {
// grant admin
}Step 4: Logout (RP-Initiated)
Local app logout and UniAuth browser logout are separate. Navigate to UniAuth for confirmation; cancellation leaves its session active, and remote notifications are best-effort. Details in the Logout Guide.
// Return URI is configured in the constructor above; logout takes no options.
await auth.logout()
// Local cleanup and best-effort refresh revocation precede UniAuth confirmation.
// Only confirmation retires the current OP session; notifications are best-effort.
// Cancelling does not restore the local app session.PKCE policy for public and confidential clients
UniAuth requires S256 PKCE for public clients. Confidential-client enforcement depends on the effective deployment and client policy; verify the profile you deploy. RFC 9700 §2.1.1 OAuth 2.0 Security Best Current Practice recommends PKCE for authorization-code flows. Apply it for the exact client and effective policy; it mitigates authorization-code injection and interception risks.
Some SDKs and libraries can generate PKCE values, but verify the exact version and flow; automatic handling is not assumed.
Framework-Specific Quickstarts
Next Steps
- • OIDC Feature Matrix — reviewed source paths and documented limits
- • Integration Checklist — 37 checks to rehearse for the exact integration
- • Logout Propagation — local end-session plus best-effort back-channel delivery and an unadvertised Limited Beta front-channel browser attempt; iframe load/error observations or the eight-second bound do not prove remote completion
- • Error Reference — documented errors; not every failure mode
- • Token Reference — access / ID / refresh token structure