- Hosts:
auth.appneurox.comserves 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. Eachauth.<domain>is connected either from the Domains page ("Connect", with the optionalCLOUDFLARE_API_TOKENsecret: a proxiedAAAA 100::record plus a Worker route in the domain's zone, removed again with the domain) or by hand as a custom domain inwrangler.jsonc. Keepwrangler.jsoncto 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/hosttells 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 takekey(site key),redirect_uri(https on the domain or its subdomains, or localhost) andstate, and send the visitor back with a single-usecode(5 minutes)./api/oauth/{google,github}/startand/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 swapscode+redirect_urifor a session token, withAuthorization: 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 (onauth.<domain>the key can be left out). The secret key is never part of them. Each domain can have an App address (for examplehttps://app.acme.com) that "Check app code" uses instead ofhttps://<domain>./,/activity,/users,/setupon 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 theEDIT_PASSCODEsecret.- Two-factor (TOTP, RFC 6238) per domain: off, optional or required, after any first step, with ten single-use recovery codes;
/two-factorandPOST /api/hosted/two-factor(verify, enable, skip). - Webhooks per domain: signed (
X-Appneural-Signature: t=…,v1=HMAC-SHA256) POSTs for auth events, logged inwebhook_deliverieswith 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.