email: route gmail app-password accounts over IMAP (Gmail API only for oauth)

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
2026-07-23 16:57:32 +00:00
co-authored by Claude Opus 4.8
parent 32caa67cab
commit edb68d396d
2 changed files with 5 additions and 3 deletions
+2 -1
View File
@@ -275,7 +275,8 @@ export async function performResync({ accountId, userEmail, userId }: ResyncPara
const account = await getEmailAccount(accountId);
if (!account || account.userId !== userId) throw new Error('Account not found');
if (account.provider === 'gmail') {
// Gmail API resync needs OAuth; a gmail account authed with an app password resyncs over IMAP.
if (account.provider === 'gmail' && account.authType === 'oauth') {
return gmailResync(userEmail);
}