I’m having trouble logging out from Entra ID & stuck as logged in user. Below is the link in my NavMenu.razor which I’m calling directly
<AuthorizeView>
<Authorized>
<a href="signout-callback-oidc" class="btn btn-outline-light" role="button">Logout</a>
</Authorized>
<NotAuthorized>
<a href="signin-oidc" class="btn btn-outline-light" role="button">Login</a>
</NotAuthorized>
</AuthorizeView>
The appsettings is
"AzureAd": {
"Authority": "https://guestxcustomers.ciamlogin.com/",
"ClientId": "id",
"ClientCredentials": [
{
"SourceType": "ClientSecret",
"ClientSecret": "secret"
}
],
"CallbackPath": "/signin-oidc",
"SignedOutCallbackPath": "/signout-callback-oidc"
}
In program.cs I have added that on Home page it should redirect if user is trying to see the page with “Authorize”
// Add services to the container.
builder.Services.AddAuthentication(OpenIdConnectDefaults.AuthenticationScheme)
.AddMicrosoftIdentityWebApp(builder.Configuration.GetSection("AzureAd"));
Any help will be appreciated as I’m new to this. Thanks!
I have tried calling it, also by hardcoding it but nothing works. I have checked the authentication as well in Entra website, the url for logout there is “https://localhost:7081/signout-callback-oidc”
1