I have 2 clients and 1 IdentityServer4 applications.
I am using implicit flow and I would like to show login/logout label on my ASP .Net Core client page (top-right corner). What is the best way to do this ?
Is there any sample MVC Core application that is showing us how to do this ?
Thanks
You can check to see if a user is authenticated in your razor like so:
@if (User.Identity.IsAuthenticated)
{
// html for logout button
}
else
{
// html for login button
}