feat(notifications): configurable OAuth2 authority + scope per SMTP configuration (defaults preserve M365) — entity + EF + migration + token service

Claude-Session: https://claude.ai/code/session_01MtdgwpEeCUn6cUA5f1LMPj
This commit is contained in:
Joseph Doherty
2026-07-10 04:07:13 -04:00
parent 178ae35308
commit 9e60347bde
8 changed files with 2201 additions and 5 deletions
@@ -185,7 +185,11 @@ public sealed class EmailNotificationDeliveryAdapter : INotificationDeliveryAdap
if (config.AuthType.Equals("oauth2", StringComparison.OrdinalIgnoreCase)
&& _tokenService != null && credentials != null)
{
credentials = await _tokenService.GetTokenAsync(credentials, cancellationToken);
credentials = await _tokenService.GetTokenAsync(
credentials,
config.OAuth2Authority,
config.OAuth2Scope,
cancellationToken);
}
// OAuth2 XOAUTH2 requires the user identity (FromAddress)