'Conditional based authentication in .NET Core application
I have a .NET Core web application. I want to implement login functionality for the website based on reading Login mode value from appsetting.json file. If login mode is on then user should be redirected to login page and no other page should be opened without authentication. If the login mode is off in json file then all the pages should open without authentication.
So is there a way where I can do conditional authentication / authorization based on the value present on appsettings.json file.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
