Skip to main content
← Back to list
01Issue
BugOpenSwamp Club
AssigneesNone

Relationships

#1204 Collective invite emailed-link return path is dropped: /accept-invite sends ?returnUrl= but /login reads ?redirect=

Opened by keeb · 7/17/2026

The collective-invite accept flow loses the return destination for every auth method, so after signing in the invitee lands on /profile instead of back on the accept-invite page.

Root cause

routes/o/[slug]/accept-invite.tsx (line ~50) redirects an unauthenticated invitee to:

/login?returnUrl=<encoded accept-invite url>

but routes/login.tsx (line ~27) only reads the redirect query param:

const rawRedirect = [HOST-1]("redirect");

The param names don't match (returnUrl vs redirect), so the return URL is silently discarded. After login/signup the user is sent to the default /profile and never returns to /o/<slug>/accept-invite, so the InviteAcceptor island is never shown.

Impact

Even setting aside the OAuth-specific failure, the emailed-link path is broken for email/password too. (The server-side auto-claim added for #1186 makes this non-blocking — invites are now claimed on verified sign-in regardless — but the emailed link still doesn't deep-link back correctly, which is confusing UX.)

Fix direction

Align the param name: either have accept-invite.tsx emit ?redirect=, or have login.tsx read returnUrl. Also thread it through the new-user OAuth path (newUserCallbackURL in islands/SignInForm.tsx is hardcoded to /choose-username and drops the destination), and forward it out of /choose-username.

Found while triaging #1186.

02Bog Flow
OPENTRIAGEDIN PROGRESSSHIPPED

Open

7/17/2026, 1:41:52 AM

No activity in this phase yet.

03Sludge Pulse

Sign in to post a ripple.