- Vue 59.7%
- TypeScript 21.2%
- CSS 16%
- Shell 2.7%
- HTML 0.2%
- Other 0.2%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
|
|
||
| .forgejo/workflows | ||
| .serena | ||
| public | ||
| scripts | ||
| src | ||
| .dockerignore | ||
| .gitignore | ||
| CHANGELOG.md | ||
| Dockerfile | ||
| index.html | ||
| nginx.conf | ||
| package-lock.json | ||
| package.json | ||
| README.md | ||
| tsconfig.app.json | ||
| tsconfig.json | ||
| tsconfig.node.json | ||
| VERSIONING.md | ||
| vite.config.ts | ||
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:
- The relying party sends the browser to the backend
/authorize, which redirects to/ui/authorize?…. AuthorizePagecallsGET /authorizeand stores the returned request context (request id, client, scopes…) inuseAuthState, mirrored insessionStorageso a reload keeps the flow (no secrets are stored)./login→/mfa→/consentpost 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, honouringresponse_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.confsets 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/.