No description
  • Vue 59.7%
  • TypeScript 21.2%
  • CSS 16%
  • Shell 2.7%
  • HTML 0.2%
  • Other 0.2%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
nhpro c3499a910c
All checks were successful
Tag Format / tag-format (push) Successful in 1s
Build and Push Docker Image / build-and-push (release) Successful in 16s
docs(changelog): release v0.20.0
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-26 14:53:53 +01:00
.forgejo/workflows fix(versioning): include 11 remote-only -pre tags in the remap 2026-06-09 14:39:57 +02:00
.serena restyle all auth pages: step indicators, display titles, back buttons, OTP timer 2026-04-23 13:46:37 +02:00
public chore: initial project scaffold (Vue 3 + Vite + TypeScript) 2026-04-14 12:56:44 +02:00
scripts fix(versioning): include 11 remote-only -pre tags in the remap 2026-06-09 14:39:57 +02:00
src fix(federation): ask for the second factor on link, announce email verification 2026-11-14 15:58:35 +01:00
.dockerignore fix(docker): run nginx unprivileged on port 8080 2026-11-14 08:04:12 +01:00
.gitignore chore: initial project scaffold (Vue 3 + Vite + TypeScript) 2026-04-14 12:56:44 +02:00
CHANGELOG.md docs(changelog): release v0.20.0 2026-11-26 14:53:53 +01:00
Dockerfile fix(docker): run nginx unprivileged on port 8080 2026-11-14 08:04:12 +01:00
index.html fix(nginx): add strict CSP and security headers, self-host fonts 2026-10-03 14:01:58 +02:00
nginx.conf fix(nginx): leave WebAuthn allowed in Permissions-Policy 2026-11-14 08:05:02 +01:00
package-lock.json chore(cleanup): remove dead components and unused dependencies 2026-10-04 11:10:55 +02:00
package.json chore(cleanup): remove dead components and unused dependencies 2026-10-04 11:10:55 +02:00
README.md docs(readme): describe the auth UI instead of the Vite template 2026-10-04 11:11:03 +02:00
tsconfig.app.json fix: add @ path alias to TypeScript and Vite config 2026-04-25 17:24:06 +02:00
tsconfig.json feat(ui): add shadcn-vue scaffolding (alert, sonner, cn helper) 2026-05-21 14:55:14 +02:00
tsconfig.node.json chore: initial project scaffold (Vue 3 + Vite + TypeScript) 2026-04-14 12:56:44 +02:00
VERSIONING.md fix(versioning): include 11 remote-only -pre tags in the remap 2026-06-09 14:39:57 +02:00
vite.config.ts chore: remove primevue, drop preset and auto-import resolver 2026-05-21 14:58:16 +02:00

OrionAuth — Auth UI

End-user authentication screens of the OrionAuth identity provider: sign-in, MFA, consent, sign-up (public, invitation, OIDC prompt=create), password reset, email verification, external-provider account linking / completion, device authorization (RFC 8628) and logout (front-channel).

Vue 3 + TypeScript + Vite single-page app, served under /ui/.

How it fits

The SPA never talks to a third-party origin: every call is a relative URL (/authorize, /authorize/login, /api/v1/auth/…, /device/…) to the OrionAuth backend, which must therefore be served on the same origin as the UI (reverse proxy in front of both).

Typical OAuth flow:

  1. The relying party sends the browser to the backend /authorize, which redirects to /ui/authorize?….
  2. AuthorizePage calls GET /authorize and stores the returned request context (request id, client, scopes…) in useAuthState, mirrored in sessionStorage so a reload keeps the flow (no secrets are stored).
  3. /login → /mfa → /consent post to /authorize/{login,mfa,consent,deny}; handleAuthorizeResult() / performRedirect() (src/composables/useRedirect.ts) send the browser back to the RP with the code or the OAuth error, honouring response_mode (query, fragment, form_post).

Without an OAuth request in progress, /login shows a "return to the application" screen: signing in always starts from the RP.

Layout

Path Content
src/pages/ One component per route (see src/router/index.ts)
src/components/ Shared UI (V2Card, AuthAlert, PasswordInput, PasswordStrength, DynamicField…)
src/composables/ State and API helpers (useApi, useAuthState, useRedirect, useUrlToken…)
src/lib/ Pure helpers: error messages (errors.ts), URL guards (url.ts), scopes, zxcvbn loader
src/styles/ Design tokens and Tailwind v4 theme
nginx.conf Production server config, including the CSP and security headers

Security notes

  • URLs coming from the query string go through safeHttpUrl() / safeFrontchannelUrl() (src/lib/url.ts) before any navigation or iframe.
  • One-shot tokens (reset, invitation, account link) are removed from the URL on load (useUrlToken).
  • Backend error messages are never displayed as-is: they are mapped from the error code to French messages (src/lib/errors.ts).
  • nginx.conf sets a strict CSP ('self' only, fonts are self-hosted via @fontsource). Adding a third-party resource requires updating it.

Development

npm ci
npm run dev      # Vite dev server (proxy /authorize, /api, /device to the backend yourself)
npm run build    # type-check (vue-tsc) + production build into dist/
npm run preview

Docker

docker build -t orion-auth-authui .

The image serves dist/ with nginx on port 80 under /ui/.