Skip to content

fix: propagate OAuth2 token to existing SMTP connections on inbound r…#387

Merged
bayger merged 1 commit into
devfrom
fix-expired-token
Jun 24, 2026
Merged

fix: propagate OAuth2 token to existing SMTP connections on inbound r…#387
bayger merged 1 commit into
devfrom
fix-expired-token

Conversation

@bayger

@bayger bayger commented Jun 24, 2026

Copy link
Copy Markdown
Contributor

…eply

Instead of caching the OAuth2 token at connection creation time,
SmtpImapConnection now looks up the fresh token from the provider
config before each send. This eliminates the stale token problem
where OAuth2TokenRefreshService updates the DB but existing
connections never see the new token.

- SmtpImapConnection takes providerId instead of oauth2AccessToken
- ensureTransporter() fetches fresh config before each send/verify
- Removed setOAuth2AccessToken() and all push-based token updates
- Removed unused refreshedOAuth2 variable from outgoing handler
@bayger bayger force-pushed the fix-expired-token branch from ce8d37f to b6e9947 Compare June 24, 2026 10:16
@bayger bayger merged commit 63611a8 into dev Jun 24, 2026
2 checks passed
@bayger bayger deleted the fix-expired-token branch June 24, 2026 11:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant