Guides

How it works

Passwords are PBKDF2-SHA256; only SHA-256 hashes of secret keys, sessions, codes and reset links are stored.

  • Hosts: auth.appneurox.com serves the dashboard and the shared Google/GitHub callbacks; auth.<domain> serves that domain's hosted pages and app API (the host names the app; admin pages and the passcode do not exist there); localhost serves everything. Each auth.<domain> is connected either from the Domains page ("Connect", with the optional CLOUDFLARE_API_TOKEN secret: a proxied AAAA 100:: record plus a Worker route in the domain's zone, removed again with the domain) or by hand as a custom domain in wrangler.jsonc. Keep wrangler.jsonc to custom domains only: a deploy replaces all custom domains with the listed ones, and once any plain route is listed it also replaces all routes. GET /api/host tells the Domains page which domain a host serves.
  • /sign-in, /sign-up, /email-code, /forgot-password, /reset-password, /verify-email — hosted pages showing the app's name; each domain picks its methods (password, email code, Google, GitHub), whether new accounts are allowed, and whether a verified email is required. They take key (site key), redirect_uri (https on the domain or its subdomains, or localhost) and state, and send the visitor back with a single-use code (5 minutes).
  • /api/oauth/{google,github}/start and /callback — authorization code flow with PKCE; one OAuth app per provider serves every domain. Accounts are linked by verified email.
  • POST /api/v1/token — the app's server swaps code + redirect_uri for a session token, with Authorization: Bearer sk_….
  • POST /api/v1/sessions/verify, POST /api/v1/sessions/revoke — check a session (returns the user, or 401 when it expired, was revoked, or the user is blocked) and sign out.
  • GET /api/provision/nextjs?key=pk_…[&file=route] — the generated Next.js files (on auth.<domain> the key can be left out). The secret key is never part of them. Each domain can have an App address (for example https://app.acme.com) that "Check app code" uses instead of https://<domain>.
  • /, /activity, /users, /setup on the dashboard host — domains with setup progress (auth host connected, app code installed, secret key in use, first account), keys, method switches and checks; activity feed with stats; users with sessions and history (sign out everywhere, block, reset link, delete); and the guide; all behind the EDIT_PASSCODE secret.
  • Two-factor (TOTP, RFC 6238) per domain: off, optional or required, after any first step, with ten single-use recovery codes; /two-factor and POST /api/hosted/two-factor (verify, enable, skip).
  • Webhooks per domain: signed (X-Appneural-Signature: t=…,v1=HMAC-SHA256) POSTs for auth events, logged in webhook_deliveries with retry.
  • Activity trends per day (7/30/90 days) and CSV export of activity and users (/api/events/export, /api/users/export).
  • GET /api/items — public inventory for subdomains.appneural.com: connected-domain ids and stages only.

Passwords are PBKDF2-SHA256; only SHA-256 hashes of secret keys, sessions, codes and reset links are stored. Sign-in, sign-up and reset requests are rate-limited per network and per account, and every attempt is written to auth_events with its reason, country, device and IP. Optional secrets switch on the extra methods: RESEND_API_KEY (email codes, verification and reset emails, sent from EMAIL_FROM), GOOGLE_CLIENT_ID + GOOGLE_CLIENT_SECRET, and GITHUB_CLIENT_ID + GITHUB_CLIENT_SECRET. The OAuth callback URLs are https://auth.appneurox.com/api/oauth/google/callback and …/github/callback.

Last updated 2 November 2026