Skip to main content
← Back to list
01Issue
BugShippedSwamp ClubTeam
Assigneeskeeb

Relationships

#1287 Email invitation is not linked to account created from invite URL

Opened by evrardjp · 7/20/2026· Shipped 7/20/2026

Description

A collective invitation sent by email is not associated with the account created through the invitation link. The invitee received the email, followed its URL, and created the account evrardj-roche, but no notification or prompt to join the collective appeared after signup. The owner dashboard continued to show the email invitation as PENDING.

Opening the same invitation URL again while signed in as the newly created account displays the invitation for the correct collective but rejects it with:

ERR:You are not the recipient of the invitation

Steps to reproduce

  1. As a collective owner, invite a new user by email with the Member role.
  2. Open the invitation email as a recipient who does not yet have a swamp.club account.
  3. Follow the invitation URL and create an account (evrardj-roche in this case).
  4. Observe that no notification or collective join prompt appears after account creation.
  5. Observe that the owner dashboard still lists the email invitation as pending.
  6. Open the original invitation URL again while authenticated as the newly created account.

Actual behavior

The invite remains pending, and the invitation page says the authenticated user is not the recipient.

Expected behavior

The account created from the emailed invitation URL should be linked to that invitation, allowing the invitee to accept it. After acceptance, the user should appear as a collective member and the invitation should no longer be pending.

Environment

  • swamp CLI: 20260719.194531.0-sha.fa7b2b2d
  • Surface: swamp.club web UI
  • Screenshots are available showing the pending owner-dashboard entry and the recipient mismatch error.

Additional context

The invitation page identifies the intended collective correctly, which suggests the invitation token resolves, but recipient identity matching after account creation does not.

02Bog Flow
OPENTRIAGEDIN PROGRESSSHIPPED+ 1 MOREASSIGNED+ 5 MOREREVIEW+ 2 MOREPR_LINKED

Shipped

7/20/2026, 9:50:11 PM

No activity in this phase yet.

03Sludge Pulse
keeb assigned keeb7/20/2026, 3:05:04 PM
Editable. Press Enter to edit.

keeb commented 7/20/2026, 9:50:04 PM

Thanks for the sharp report, @evrardjp — the reproduction and the "not the recipient" detail pinpointed it exactly.

Two defects were in play:

  1. The invite→login redirect used a returnUrl param the auth pages did not read (they only honored redirect), so after signup you landed on /profile instead of back on the invitation — no join prompt, invite stayed pending.
  2. Nothing bound the new account's email to the invited address, and invitations were stored non-lowercased while the auto-claim query lowercases — so an account created from the link never matched, the auto-claim silently skipped, and re-opening the link hit BetterAuth's recipient check ("You are not the recipient of the invitation").

Fixed in PR #956 (merged): login/signup now honor returnUrl, invited emails are lowercased at creation, a signup opened from an invite link prefills + locks the invited address so it auto-joins on verification, and a mismatched account now gets a clear "wrong account" screen (showing only your own email, never the invited one) instead of the raw error.

Verified end-to-end against the exact scenario you described. Appreciate the detailed write-up. 🐊

Sign in to post a ripple.