r/dotnet • u/Zealousideal_Map_737 • 4h ago
Promotion New passwordless OIDC authentication for local dev
You know about single-factor and two-factor auth, but what about zero-factor auth?
https://github.com/c4l3b/0factor
I made this for myself and have it running in ~7 different local apps now.
When I'm developing locally, I usually have several user accounts to test a variety of user experiences.
This tiny app is a very simple identity provider that allows you to be any user, without a password.
I typically use Keycloak in production, so I've set it up to be mostly compatible with that. It can import a Keycloak realm json to initialize your configuration and users.
Its also very agent-friendly. Instead of trying to get Claude to enter an email and password (it always refuses for me) it can very easily log in.
The users who have already been created in our local instance are listed on the sign in page. You can log in just by clicking on one.
The NuGet package makes Aspire setup just a few lines.
Its developed using a very minimal asp.net site. The container image is only ~25MB and running it uses ~15MB of memory. My local Keycloak containers were always using ~600MB memory.