AuthenticationWithClientSideBlazor
AuthenticationWithClientSideBlazor copied to clipboard
Net core5
This version works with Net Core 5.
It is based on a new template, with the changes applied as described in the blog.
It specifies
[Authorize(AuthenticationSchemes = JwtBearerDefaults.AuthenticationScheme)]
in the WeatherForcastController. Without this, it uses cookie based authentication, not the JWT authentication. You can now login, and as long as the expirydate on the token is not passed, you can start the app again and you do not need to login again.
If you start after logout, you will be automatically redirected to the login page.