DGates.Identity.NotificationProviders
1.0.0
dotnet add package DGates.Identity.NotificationProviders --version 1.0.0
NuGet\Install-Package DGates.Identity.NotificationProviders -Version 1.0.0
<PackageReference Include="DGates.Identity.NotificationProviders" Version="1.0.0" />
<PackageVersion Include="DGates.Identity.NotificationProviders" Version="1.0.0" />
<PackageReference Include="DGates.Identity.NotificationProviders" />
paket add DGates.Identity.NotificationProviders --version 1.0.0
#r "nuget: DGates.Identity.NotificationProviders, 1.0.0"
#:package DGates.Identity.NotificationProviders@1.0.0
#addin nuget:?package=DGates.Identity.NotificationProviders&version=1.0.0
#tool nuget:?package=DGates.Identity.NotificationProviders&version=1.0.0
DGates.Identity.NotificationProviders
Drop-in IEmailSender/ISmsSender providers for ASP.NET Core Identity. Wire up email or SMS
delivery for password resets, email confirmation, and two-factor codes with one DI call, no
hand-rolled sender required.
Targets .NET 10 only — not compatible with .NET Framework (e.g. net48).
- Email: SMTP, SendGrid, Postmark — each implements ASP.NET Core Identity's own
Microsoft.AspNetCore.Identity.UI.Services.IEmailSender, so they drop straight into Identity with no extra plumbing. - SMS: Twilio, AWS SNS — both implement this package's own
ISmsSender. There's no stock SMS-sender contract in ASP.NET Core Identity, so this package defines one, deliberately shaped against two independent backends from the start so it doesn't end up fitting only one vendor.
Every provider has its own IOptions<T> — no cross-provider coupling, no shared config surface
you don't need.
Install
dotnet add package DGates.Identity.NotificationProviders
Usage
Each provider is registered with a single extension method, which binds its own config section and registers the sender for DI:
builder.Services.AddSmtpEmailSender(builder.Configuration);
// or: AddSendGridEmailSender / AddPostMarkEmailSender
builder.Services.AddTwilioSmsSender(builder.Configuration);
// or: AddSnsSmsSender
Only register one email provider and one SMS provider — the last one registered wins for its respective interface.
SMTP (SmtpEmailConfigs):
{
"SmtpEmailConfigs": {
"Host": "smtp.example.com",
"Port": 587,
"FromAddress": "noreply@example.com",
"UserName": "smtp-user",
"Password": "smtp-password",
"EnableSsl": true
}
}
SendGrid (SendGridEmailConfigs):
{
"SendGridEmailConfigs": {
"ApiKey": "SG.xxxxx",
"FromAddress": "noreply@example.com",
"FromName": "Example App"
}
}
Postmark (PostMarkEmailConfigs):
{
"PostMarkEmailConfigs": {
"ApiKey": "xxxxx",
"FromAddress": "noreply@example.com"
}
}
SMS
Twilio (TwilioSmsConfigs):
{
"TwilioSmsConfigs": {
"AccountSid": "ACxxxxx",
"AuthToken": "xxxxx",
"FromNumber": "+15555550100"
}
}
AWS SNS (SnsSmsConfigs):
{
"SnsSmsConfigs": {
"Region": "us-east-1",
"SenderId": "ExampleApp",
"SmsType": "Transactional"
}
}
Uses the default AWS credential chain (IAM role, environment, etc.) unless AccessKey/SecretKey
are explicitly set — leave them unset in production.
Redirecting to a test inbox/phone
Every provider supports OverrideRecipient: when set, all messages are redirected there instead
of their real recipient, with the original recipient appended to the subject (email) or message
body (SMS). Useful for smoke-testing against production-like config without emailing/texting
real users.
Pointing at a sandbox instead of the real vendor
Twilio, SendGrid, Postmark, and SNS all support a base-URL override (BaseUrlOverride for
Twilio/SendGrid/Postmark, ServiceUrlOverride for SNS) that redirects API requests away from
the real vendor endpoint — useful for pointing at a sandbox or mock service of your own instead
of a live account.
License
MIT — see LICENSE.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net10.0
- AWSSDK.SimpleNotificationService (>= 4.0.100.7)
- Microsoft.AspNetCore.Identity.UI (>= 10.0.10)
- Newtonsoft.Json (>= 13.0.4)
- Postmark (>= 5.4.1)
- SendGrid (>= 9.29.3)
- Twilio (>= 7.14.9)
NuGet packages (1)
Showing the top 1 NuGet packages that depend on DGates.Identity.NotificationProviders:
| Package | Downloads |
|---|---|
|
DGates.Identity.Jwt2Fa
Real, claims-bearing JWTs and multi-channel two-factor authentication (Authenticator/TOTP, Email, SMS) for ASP.NET Core Identity - generic over your own user type. |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 1.0.0 | 645 | 8/4/2026 |
| 1.0.0-beta.1 | 64 | 8/4/2026 |