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
Apply default connections and sources when accepting a team invite #2921
DEFAULT_CONNECTIONS and DEFAULT_SOURCES are applied when password registration creates a new team, but not when the first user accepts an invite to an already-created empty team.
That leaves the invited team without its configured default connection and sources. Deployments that bootstrap a team and invite before the first user joins must either mutate MongoDB directly or leave source setup to a user.
Expected behavior
After invite-based user registration succeeds, call setupTeamDefaults(teamInvite.teamId) with the same non-fatal error handling used by password registration.
The existing helper already preserves configured teams by skipping connection or source creation when those objects exist.
Reproduction
Configure DEFAULT_CONNECTIONS and DEFAULT_SOURCES.
Create an empty team and a valid invite for it.
Accept the invite through POST /team/setup/:token.
Observe that the user is created, but the configured connection and sources are not.
Suggested coverage
An invited empty team receives its configured defaults.
An invited team with existing sources is not overwritten.
Default provisioning failure does not prevent the user from joining.
@mfroembgen, can you elaborate on the issue here? Especially what you mean by “but not when the first user accepts an invite to an already-created empty team”?
@Vansh98789@wrn14897 Yes, this issue is still open. PR #2922 contains the fix.
The problem occurs when a team and a team invite exist before the first user account exists. The first user accepts the team invite. The API creates the user and adds the user to the team.
Before this fix, the API did not create the configured default connections and sources for that team. Normal password registration already performs this setup.
PR #2922 makes team invite acceptance perform the same setup. It also makes sure that the API uses the invited team ID.
Activity
Vansh98789 commentedon Aug 17, 2026
Hi @mfroembgen, is the issue still open?
wrn14897 commentedon Aug 18, 2026
@mfroembgen, can you elaborate on the issue here? Especially what you mean by “but not when the first user accepts an invite to an already-created empty team”?
mfroembgen commentedon Sep 3, 2026
@Vansh98789 @wrn14897 Yes, this issue is still open. PR #2922 contains the fix.
The problem occurs when a team and a team invite exist before the first user account exists. The first user accepts the team invite. The API creates the user and adds the user to the team.
Before this fix, the API did not create the configured default connections and sources for that team. Normal password registration already performs this setup.
PR #2922 makes team invite acceptance perform the same setup. It also makes sure that the API uses the invited team ID.
mfroembgen commentedon Sep 3, 2026
But when we stick with the initial registration flow, then its actually not an issue. Therefore let me close this issue.