The activation link does not work
The activation link does not work
Activation links are short-lived JWTs, so an old link or a second click gives you one of these:
1
Request a new activation email
From the login page.
2
Copy the link, do not retype it
And open it in the browser you signed up in.
The login API returns 404 or 204
The login API returns 404 or 204
Neither
/api/health nor /auth/me exists, so if something sent you looking for them, that is
why they 404.What the frontend actually uses is the auth cookie in middleware plus GET /user/self, which
comes back empty when you are not signed in. That is the call to watch in the network tab.Signed in and /user/self still 404s? NEXT_PUBLIC_BACKEND_URL does not match the URL your
browser is using. A mismatched protocol or port breaks the session cookie.Self-host: everyone is logged out after a restart
Self-host: everyone is logged out after a restart
JWT_SECRET signs session tokens, so regenerating it invalidates every existing session.Set JWT_SECRET once at first deployment. Keep it in a secret manager, a Docker or Kubernetes
secret, or an untracked .env on the host. Never commit it, including to a private deploy
repo: anyone with repo access then holds the signing key for every session token she has ever
issued.Self-host: Origin not allowed
Self-host: Origin not allowed
The backend builds its CORS allowlist from
FRONTEND_URL, plus MAIN_URL if set. Reach her on
a hostname or port outside that list and the call is rejected.Make FRONTEND_URL match the URL you use in the browser exactly, protocol and port included.Next steps
Configuration reference
Every variable she reads, including the two above
Email configuration
Why an activation mail may never have been sent
Domain and HTTPS
Getting the URLs and the cookie domain right
Still stuck?
What to put in a report so the first reply is the useful one