Skip to content

Has anybody ACTUALLY got this working in a REAL Blazor server app?! #1476

Answered by jmprieur
ataraxia89 asked this question in Q&A
Discussion options

You must be logged in to vote

@ataraxia89

in your code:

services.Configure<OpenIdConnectOptions>(OpenIdConnectDefaults.AuthenticationScheme, options => {
}
  • you shouldn't need to add the scopes (Microsoft.Identity.Web will do it for you)
  • options.ClientSecret = Configuration[$"{Constants.AzureAdB2C}:ClientSecret"]; shouldn't be needed either (if it's in the config file?)

Did you try without this bloc for the moment?

services.AddAuthorization(authorizationOptions =>
{
    authorizationOptions.AddPolicy(
        App.Policies.CanManageUsers,
        App.Policies.CanManageUsersPolicy());
});

Replies: 2 comments 5 replies

Comment options

You must be logged in to vote
5 replies
@ataraxia89
Comment options

@ataraxia89
Comment options

@jmprieur
Comment options

@ataraxia89
Comment options

@ataraxia89
Comment options

Answer selected by jennyf19
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants