Description
Invitation links for newly created organizations do not reliably open the correct join page. Invited users are often redirected to a 404 page after clicking the link in the invitation email.
Steps to reproduce
Create a new organization.
Invite an employee.
Send the invite from either the organization/customer view or the agency view.
Open the invitation link from the email.
Actual result
The invitation link redirects to a 404 page. This happened with customer invites, agency-view invites, and a self-invite test. In one case, incognito mode worked once, but for other users incognito mode still led to a 404 page.
Expected result
The invite link should always open the correct join/setup page for the invited organization, regardless of login status or browser mode.
Impact
Employees cannot reliably join new organizations, which blocks customer onboarding.
