Skip to content

Send signed-out link visitors to sign-in - #59

Merged
nicosuave merged 1 commit into
mainfrom
sign-in-redirect-links
Oct 14, 2026
Merged

nicosuave merged 1 commit into
mainfrom
sign-in-redirect-links

Conversation

@nicosuave

Copy link
Copy Markdown
Member

Opening a private link (or any path other than / and /gallery) while signed out returned a JSON 401 with a loginUrl nothing followed, so people had no way to sign in.

Top-level browser navigations (Sec-Fetch-Dest: document, or Accept: text/html without Fetch Metadata) now redirect to /sign-in?returnTo=... and land back on the link after sign-in. Gallery fetches, iframes, and MCP/curl clients still get the JSON 401.

The service-token test now opens the private link signed out, signs in, and checks it returns to the rendered artifact.

Private links and other non-gallery paths answered a signed-out browser
with a JSON 401, leaving no way to sign in. Top-level document
navigations now redirect to /sign-in with returnTo, so the visitor lands
back on the link after signing in. Fetches, frames and MCP keep the JSON
challenge.
@nicosuave
nicosuave merged commit f21ecfd into main Oct 14, 2026
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant