Hi BeUnique,
Thank you for reaching out to Microsoft Q & A forum.
To replace Windows Authentication with Single Sign-On (SSO) in your ASP.NET application using an open-source solution, I recommend using OpenID Connect (OIDC) with an identity provider like Keycloak.
1.Set Up Keycloak Locally You can quickly run Keycloak using Docker:
docker run -p 8080:8080 -e KEYCLOAK_ADMIN=admin -e KEYCLOAK_ADMIN_PASSWORD=admin quay.io/keycloak/keycloak:latest start-dev
Then, access the admin console at http://localhost:8080 to create a Realm, Client, and test Users.
2.Configure Your ASP.NET Application
Add the OpenID Connect package:
dotnet add package Microsoft.AspNetCore.Authentication.OpenIdConnect
In your Startup.cs or program setup, configure authentication using the Keycloak settings (authority URL, client ID, secret, etc.).
3.Secure Your Application Use the [Authorize] attribute to protect controllers or pages that require authentication.
4.Deploy to Server Host Keycloak on your server (Docker or standalone) and update the redirect URLs in both Keycloak and your ASP.NET app settings.
If you have found the answer provided to be helpful, please click on the "Accept answer/Upvote" button so that it is useful for other members in the Microsoft Q&A community.