Nedo.AspNet.Authentication.Dev
2.0.7
See the version list below for details.
dotnet add package Nedo.AspNet.Authentication.Dev --version 2.0.7
NuGet\Install-Package Nedo.AspNet.Authentication.Dev -Version 2.0.7
<PackageReference Include="Nedo.AspNet.Authentication.Dev" Version="2.0.7" />
<PackageVersion Include="Nedo.AspNet.Authentication.Dev" Version="2.0.7" />
<PackageReference Include="Nedo.AspNet.Authentication.Dev" />
paket add Nedo.AspNet.Authentication.Dev --version 2.0.7
#r "nuget: Nedo.AspNet.Authentication.Dev, 2.0.7"
#:package Nedo.AspNet.Authentication.Dev@2.0.7
#addin nuget:?package=Nedo.AspNet.Authentication.Dev&version=2.0.7
#tool nuget:?package=Nedo.AspNet.Authentication.Dev&version=2.0.7
Nedo.AspNet.Authentication.Dev
Bypass-password sign-in endpoint for local development and integration tests. Issues a real JWT for any registered user without checking credentials, gated to Development environment by default. Save your fingers from typing password123 for the hundredth time and let your tests skip captcha + lockout + MFA setup boilerplate.
⚠️ Read this before installing
This package exists to make dev fast. Never enable it in production. The default registration refuses to wire up outside IHostEnvironment.IsDevelopment(), but a hostile config could override that — review your deployment.
Install
dotnet add package Nedo.AspNet.Authentication.Dev
Quickstart
using Nedo.AspNet.Authentication.Dev;
builder.Services.AddDevAuth(); // refuses to register outside Development by default
var app = builder.Build();
app.MapDevAuth(); // POST /auth/dev/sign-in { username }
Endpoint
| Method | Path | Body | Returns |
|---|---|---|---|
| POST | /auth/dev/sign-in |
{ username } |
TokenResponse (same shape as /auth/login) |
The user must already exist in the user store — this is impersonation, not provisioning. For brand-new users, hit /auth/register first.
Use cases
- Manual dev — skip
/auth/login+ captcha + 2FA when iterating on protected routes. - Integration tests — get a bearer token in one HTTP call without setting up password hashes / TOTP enrolment / captcha mocks.
- Demos — let an audience switch user identities live without typing passwords.
Disabling for non-dev environments
The default behaviour is "register only when IsDevelopment". To force-enable elsewhere (e.g. a staging environment that explicitly wants impersonation), pass allowOutsideDevelopment: true:
builder.Services.AddDevAuth(allowOutsideDevelopment: true);
Pair with infrastructure-level controls (firewall the endpoint, require an internal-only header, etc.) — this package doesn't add an authorization gate around the endpoint itself.
Docs
Related
| Package | Role |
|---|---|
Nedo.AspNet.Authentication.Local |
Required peer — provides SessionTokenIssuer + the user store. |
License
MIT — see LICENSE.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net9.0 is compatible. 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. |
-
net9.0
- Nedo.AspNet.Authentication (>= 2.0.7)
- Nedo.AspNet.Authentication.Local (>= 2.0.7)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.