Nedo.AspNet.Authentication.Dev 2.0.9

dotnet add package Nedo.AspNet.Authentication.Dev --version 2.0.9
                    
NuGet\Install-Package Nedo.AspNet.Authentication.Dev -Version 2.0.9
                    
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="Nedo.AspNet.Authentication.Dev" Version="2.0.9" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Nedo.AspNet.Authentication.Dev" Version="2.0.9" />
                    
Directory.Packages.props
<PackageReference Include="Nedo.AspNet.Authentication.Dev" />
                    
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 Nedo.AspNet.Authentication.Dev --version 2.0.9
                    
#r "nuget: Nedo.AspNet.Authentication.Dev, 2.0.9"
                    
#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 Nedo.AspNet.Authentication.Dev@2.0.9
                    
#: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=Nedo.AspNet.Authentication.Dev&version=2.0.9
                    
Install as a Cake Addin
#tool nuget:?package=Nedo.AspNet.Authentication.Dev&version=2.0.9
                    
Install as a Cake Tool

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

docs/providers/dev-auth.md.

Package Role
Nedo.AspNet.Authentication.Local Required peer — provides SessionTokenIssuer + the user store.

License

MIT — see LICENSE.

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

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.9 97 5/11/2026
2.0.8 87 5/6/2026
2.0.7 87 5/5/2026
2.0.6 87 5/5/2026
2.0.4 82 5/4/2026
2.0.3 94 5/4/2026
2.0.2 90 5/2/2026
2.0.1 83 5/2/2026
2.0.0 88 5/1/2026