gitroomhq/postiz-app · error · HttpException
Multiple accounts exist for this email (different login prov
Error message
Multiple accounts exist for this email (different login providers)
What it means
Thrown as HTTP 400 when the invited email matches more than one user account, which happens when the same email is registered through different login providers (e.g. Google OAuth and email/password). The system can't disambiguate which account to add.
Source
Thrown at libraries/nestjs-libraries/src/database/prisma/organizations/organization.service.ts:126
org?.subscription?.subscriptionTier ||
(!process.env.STRIPE_PUBLISHABLE_KEY ? 'ULTIMATE' : 'FREE');
if (!pricing[tier].team_members) {
throw new HttpException(
'The organization plan does not include team members',
400
);
}
const users = await this._organizationRepository.getUsersByEmail(
body.email
);
if (!users.length) {
throw new HttpException('No Postiz account found for this email', 400);
}
if (users.length > 1) {
throw new HttpException(
'Multiple accounts exist for this email (different login providers)',
400
);
}
const [user] = users;
const userOrgs = await this._organizationRepository.getOrgsByUserId(
user.id
);
if (userOrgs.some((current) => current.id === org.id)) {
throw new HttpException(
'User is already a member of this organization',
400
);
}
const added = await this._organizationRepository.addUserToOrg(View on GitHub (pinned to 0f1647f749)
Solutions
- Ask the user to remove or consolidate one of the duplicate accounts (delete the unused provider account)
- As admin, merge or delete the duplicate user record in the database so only one remains
- Invite using an email tied to a single account
Defensive patterns
Strategy: try-catch
Validate before calling
const users = await lookupUsersByEmail(email);
if (users.length > 1) { askUserToPickAccountOrConsolidate(); return; } Type guard
const isUniqueAccount = (users: User[]): users is [User] => users.length === 1;
Try / catch
try { await addTeamMember(orgId, email); } catch (e) { if (/Multiple accounts/.test(e.message)) { showMessage('Ask member to remove duplicate login'); return; } throw e; } Prevention
- Warn users not to register the same email via multiple providers
- Deduplicate legacy accounts during provider migrations
When it happens
Trigger: Calling addTeamMemberByEmail for an email that exists multiple times in the users table with different provider identifiers.
Common situations: Collaborator signed up with both Google SSO and credentials; legacy duplicate accounts after provider migrations; test environments with repeated seeded signups.
Related errors
- 'The organization plan does not include team members'
- No Postiz account found for this email
- User is already a member of this organization
- Could not add the user to the organization
- User is not part of this organization
AI-assisted analysis of gitroomhq/postiz-app@0f1647f749 (2026-08-27).
Data as JSON: /api/errors/dd9ae2a4dc2001f7.
Report an issue: GitHub.