HCS.Passwordless.MagicLink
2.0.0
There is a newer version of this package available.
See the version list below for details.
See the version list below for details.
dotnet add package HCS.Passwordless.MagicLink --version 2.0.0
NuGet\Install-Package HCS.Passwordless.MagicLink -Version 2.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="HCS.Passwordless.MagicLink" Version="2.0.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="HCS.Passwordless.MagicLink" Version="2.0.0" />
<PackageReference Include="HCS.Passwordless.MagicLink" />
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 HCS.Passwordless.MagicLink --version 2.0.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: HCS.Passwordless.MagicLink, 2.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 HCS.Passwordless.MagicLink@2.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=HCS.Passwordless.MagicLink&version=2.0.0
#tool nuget:?package=HCS.Passwordless.MagicLink&version=2.0.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
HCS.Passwordless.MagicLink
Magic link sign-in for Umbraco 13 members. Part of the HCS Passwordless suite. Provides email-based one-click authentication with built-in rate limiting, single-use tokens, and a branded email notification system.
Installation
dotnet add package HCS.Passwordless.MagicLink
Setup
1. Register (Program.cs)
builder.CreateUmbracoBuilder()
.AddBackOffice()
.AddWebsite()
.AddPasswordlessMagicLink()
.Build();
2. Map endpoints (Program.cs)
app.MapPasswordlessMembers();
3. Configure (appsettings.json)
{
"HCS": {
"Authentication": {
"LoginPath": "/login",
"PostLoginRedirectPath": "/member",
"RejectUnknownEmails": false,
"MagicLink": {
"Enabled": true,
"TokenLifespan": "00:15:00"
},
"RateLimits": {
"PerIpRequestsPerMinute": 10,
"PerEmailRequestsPerHour": 5,
"VerifyPerIpPerMinute": 20,
"FakeWorkDelay": "00:00:00.250"
},
"Notifications": {
"FromAddress": "noreply@example.com",
"FromName": "My Site",
"MagicLinkSubject": "Your sign-in link",
"Branding": {
"ProductName": "My Site",
"AccentColor": "#2d6cdf"
}
}
}
}
}
4. Login view
@await Html.PartialAsync("Passwordless/LoginForm")
Configuration Options
HCS:Authentication
| Key | Type | Default | Description |
|---|---|---|---|
LoginPath |
string | /login |
URL of the login page |
PostLoginRedirectPath |
string | / |
Redirect after successful sign-in |
RejectUnknownEmails |
bool | false |
Return an error for unrecognised emails (vs. silent success) |
HCS:Authentication:MagicLink
| Key | Type | Default | Description |
|---|---|---|---|
Enabled |
bool | true |
Enable/disable magic link flow |
TokenLifespan |
TimeSpan | 00:15:00 |
How long a link remains valid |
HCS:Authentication:RateLimits
| Key | Type | Default | Description |
|---|---|---|---|
PerIpRequestsPerMinute |
int | 10 |
Max auth requests per IP per minute |
PerEmailRequestsPerHour |
int | 5 |
Max requests per email address per hour |
VerifyPerIpPerMinute |
int | 20 |
Max verify attempts per IP per minute |
FakeWorkDelay |
TimeSpan | 00:00:00.250 |
Minimum response time (timing attack mitigation) |
Endpoints
| Method | Path | Description |
|---|---|---|
POST |
/auth/magic-link/request |
Request a magic link email |
GET |
/auth/magic-link/verify |
Show sign-in confirmation page |
POST |
/auth/magic-link/verify |
Validate token and sign in |
Customising Email Templates
Place overriding views in your host project under the same paths:
Views/
Emails/
Passwordless/
MagicLink.cshtml # HTML email
MagicLink.Text.cshtml # Plain-text email
_Layout.cshtml # Shared email layout
Shared/
Passwordless/
LoginForm.cshtml # Login form partial
MagicLinkConfirm.cshtml # Sign-in confirmation page (shown when link is clicked)
Replacing Services
All services are registered with TryAdd*, so you can replace any of them in DI before calling AddPasswordlessMagicLink:
services.AddScoped<IPasswordlessNotificationSender, MyCustomSender>();
Key replaceable services:
| Interface | Default implementation | Purpose |
|---|---|---|
IPasswordlessNotificationSender |
EmailNotificationSender |
Send magic link emails |
ISingleUseTokenStore |
DistributedCacheSingleUseTokenStore |
Token persistence |
IPasswordlessRateLimiter |
SlidingWindowRateLimiter |
Rate limiting |
IMemberLookupService |
MemberLookupService |
Resolve member by email |
IPasswordlessSignInService |
PasswordlessSignInService |
Sign in member |
| 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. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
net10.0
- HCS.Passwordless.Core (>= 2.0.0)
- MailKit (>= 4.16.0)
- Umbraco.Cms.Core (>= 17.3.5 && < 18.0.0)
- Umbraco.Cms.Infrastructure (>= 17.3.5 && < 18.0.0)
- Umbraco.Cms.Web.Common (>= 17.3.5 && < 18.0.0)
- Umbraco.Cms.Web.Website (>= 17.3.5 && < 18.0.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 2.0.2 | 79 | 5/18/2026 |
| 2.0.1 | 80 | 5/18/2026 |
| 2.0.0 | 82 | 5/18/2026 |
| 2.0.0-beta002 | 76 | 5/18/2026 |
| 2.0.0-beta001 | 71 | 5/18/2026 |
| 1.0.1 | 80 | 5/18/2026 |
| 1.0.0 | 81 | 5/18/2026 |
| 1.0.0-beta002 | 71 | 5/18/2026 |
| 1.0.0-beta001 | 72 | 5/18/2026 |