fix: onboarding - team invites (#27113)

This commit is contained in:
sean-brydon authored and GitHub committed 2026-01-23 16:31:35 +00:00
1 parent 02824b17c3
commit 09194c58e1
7 files changed
+61 -13

No files matched your search

@@ -64,9 +64,11 @@ export async function checkOnboardingRedirect(
// Determine which onboarding path to use
const onboardingV3Enabled = await featuresRepository.checkIfFeatureIsEnabledGlobally("onboarding-v3");
const hasPendingInvite = await MembershipRepository.hasPendingInviteByUserId({ userId });
// Check for any team membership (pending or accepted) to handle users who signed up via invite token
// When users sign up with an invite token, the membership is auto-accepted
const hasTeamMembership = await MembershipRepository.hasAnyTeamMembershipByUserId({ userId });
if (hasPendingInvite && onboardingV3Enabled) {
if (hasTeamMembership && onboardingV3Enabled) {
return "/onboarding/personal/settings";
}