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
fix(companies): invited colleagues cannot sign up while the waitlist is on #526
With Clerk in Waitlist mode, a colleague invited from /company cannot create an account. The invitation email's link goes to Patchy's /join with Clerk's invitation ticket (__clerk_ticket). Patchy never uses the ticket, so /join shows the signed-out door. Its "Sign in" leads to Clerk's pages without the ticket, and Clerk rejects the sign-up with sign_up_restricted_waitlist. The colleague ends up on the waitlist like a stranger.
Checked on a throwaway Clerk app in Waitlist mode:
An invited email signing up without the ticket gets sign_up_restricted_waitlist, the same as an uninvited one.
With the ticket, sign-up completes and Clerk verifies the email.
An invitation created without redirect_url opens Clerk's own /sign-up?__clerk_ticket=…, which uses the ticket. An existing account gets /sign-in instead.
Development runs in public sign-up mode, which hides the problem, and the live Clerk tests never open an invitation's link.
Fix
Create Clerk invitations without a redirect URL, as Clerk's docs advise when the app has no sign-up page of its own. After sign-up Clerk sends the person to the instance's home URL. / sends a signed-in person without a company to /join, which lists their invitation by email.
Signing up through the ticket now marks the Clerk invitation accepted before the person joins in Patchy. Clerk refuses to revoke an accepted invitation (invitation_already_accepted, 400), so revoke and resend treat it like an already-revoked one: Patchy's own invitation is what admits someone to the company.
Invitations sent before the fix keep their old link. Production has sent none.
Activity