Usually for OpenID authentication, I would just use button-styled links for this:
I would add mapping of an "/logout" URL to the authentication middleware, which calls the logout flow and returns to the start page.
For the login button, I would make it link to the "My Profile" page, which happens to require the "Authenticated" virtual role. So this would automatically initiate the authentication flow (redirect to the Azure AD B2C platform).
Hi guys,
I was integrating Azure B2C to a site. The B2C setup is ready. I am trying to add a sign in and out buttons.
So I created a ViewComponent with two buttons and get it involved in the start page.
The ViewComponent is like below. It is not working and the attributes (asp-controller, asp-action) are not recognized as well. How can I make it work?
Any ideas and suggestions would be highly appreciated.