I'm actually working on an website where users login via windows authentication.
My problem is, that actually all users have to login whenever they open our webpage. I wonder if it is possible to keep that windows authentification alive? Maybe with cookies?
I implemented the authentification by adding this to my Startup.cs
:
services.Configure<IISOptions>(options =>
{
options.AutomaticAuthentication = true;
});
services.AddAuthentication(IISDefaults.AuthenticationScheme);
And activating Windows-Authentication in my project-settings.
Afterwards im able to use the Authorize-atrribute:
[Authorize]
public IActionResult Index()
{
return View();
}
If the user isn't logged in he is now asked to log in.
Is there any way to keep the windows-authentication alive, even if the user is closing his browser?
Thanks for your help and your ideas in advance!