Open
Description
This is dotnet 8 with Blazor WASM and Blazor server app.
builder.Services.AddMsalAuthentication(options =>
{
var serviceProvider = builder.Services.BuildServiceProvider();
var navigationManager = serviceProvider.GetRequiredService<NavigationManager>();
var currentUri = navigationManager.Uri;
if (currentUri.Contains("buy-me"))
{
builder.Configuration.Bind("AzureAdB2C:Paypal", options.ProviderOptions.Authentication);
options.ProviderOptions.DefaultAccessTokenScopes.Add(builder.Configuration.GetValue<string>("AzureAdB2C:ConsumerHub:ClientId"));
options.ProviderOptions.LoginMode = "redirect";
}
else
{
builder.Configuration.Bind("AzureAdB2C:DefaultAuthority", options.ProviderOptions.Authentication);
options.ProviderOptions.DefaultAccessTokenScopes.Add(builder.Configuration.GetValue<string>("AzureAdB2C:DefaultAuthority:ClientId"));
options.ProviderOptions.LoginMode = "redirect";
}
});

It appears the authentication state is not being accepted for the buy-me
route by MSAL. Can I please get some assistance on this please?