HCS.Passwordless.MagicLink
1.0.0-beta001
See the version list below for details.
dotnet add package HCS.Passwordless.MagicLink --version 1.0.0-beta001
NuGet\Install-Package HCS.Passwordless.MagicLink -Version 1.0.0-beta001
<PackageReference Include="HCS.Passwordless.MagicLink" Version="1.0.0-beta001" />
<PackageVersion Include="HCS.Passwordless.MagicLink" Version="1.0.0-beta001" />
<PackageReference Include="HCS.Passwordless.MagicLink" />
paket add HCS.Passwordless.MagicLink --version 1.0.0-beta001
#r "nuget: HCS.Passwordless.MagicLink, 1.0.0-beta001"
#:package HCS.Passwordless.MagicLink@1.0.0-beta001
#addin nuget:?package=HCS.Passwordless.MagicLink&version=1.0.0-beta001&prerelease
#tool nuget:?package=HCS.Passwordless.MagicLink&version=1.0.0-beta001&prerelease
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")
@await Html.PartialAsync("Passwordless/MagicLinkLanding")
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
All endpoints are prefixed by BasePath (default /umbraco/passwordless).
| Method | Path | Description |
|---|---|---|
POST |
/magic-link/request |
Request a magic link email |
GET |
/magic-link/verify |
Verify 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
MagicLinkLanding.cshtml # "Check your email" page partial
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 | net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. 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. |
-
net8.0
- HCS.Passwordless.Core (>= 1.0.0-beta001)
- Microsoft.AspNetCore.DataProtection (>= 8.0.15)
- Microsoft.Extensions.Options.DataAnnotations (>= 8.0.0)
- Umbraco.Cms.Core (>= 13.13.1 && < 14.0.0)
- Umbraco.Cms.Infrastructure (>= 13.13.1 && < 14.0.0)
- Umbraco.Cms.Web.Common (>= 13.13.1 && < 14.0.0)
- Umbraco.Cms.Web.Website (>= 13.13.1 && < 14.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 |