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
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="DGates.Identity.NotificationProviders" Version="1.0.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="DGates.Identity.NotificationProviders" Version="1.0.0" />
                    
Directory.Packages.props
<PackageReference Include="DGates.Identity.NotificationProviders" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add DGates.Identity.NotificationProviders --version 1.0.0
                    
#r "nuget: DGates.Identity.NotificationProviders, 1.0.0"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package DGates.Identity.NotificationProviders@1.0.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=DGates.Identity.NotificationProviders&version=1.0.0
                    
Install as a Cake Addin
#tool nuget:?package=DGates.Identity.NotificationProviders&version=1.0.0
                    
Install as a Cake Tool

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.

Email

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 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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

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