You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
auth.login_path: let a site serve its own login page #159
The content-gating docs described a loginPath option (custom login page route). It never existed: /auth/login is hard-coded in the gating redirect (src/auth/gating.ts), the mounted routes (src/auth/mount.ts), the password-login error redirect (src/auth/password-login.ts) and the login form. The docs are corrected in duneorg/dune-docs#30. A site with its own login or join page (e.g. a members site with a branded entry page) has no way to send visitors there.
Proposal
site.yaml:
auth:
login_path: /join # default: /auth/login
Gating redirects (page gate, mediaDenialResponse, anything else that builds /auth/login?next=) go to login_path with ?next=.
GET /auth/login redirects to login_path when it is set, preserving the query (next, error). Decided: it redirects rather than still rendering, so there is one login page.
Everything else under /auth/* stays mounted: POST /auth/login, OAuth callbacks, magic-link verification, logout. The custom page posts to them.
Failures that redirect back to the login page (?error=invalid etc.) go to login_path.
The site provides the page at login_path itself (a normal Dune page or TSX route).
Edge cases to settle in the PR
Validate the value: a local absolute path (starts with a single /), not an external URL, not //host.
login_path equal to /auth/login (or unset) is the current behaviour, with no redirect loop.
Activity