Has anybody ACTUALLY got this working in a REAL Blazor server app?! #1476
-
All I want to do is get an access token. This is in my Startup.cs:
I'm using this to obtain an access token:
When I run my app for the first time I get redirected to my Azure B2C login flow no problems, sign in and get returned to my app, but then any future calls to obtain an access token (as above) redirect me to https://localhost:44339/MicrosoftIdentity/Account/Challenge?redirectUri=https://localhost:44339/&scope=https://mydomain.net/api/my.scope%20openid%20offline_access%20profile&loginHint=John%20Smith&domainHint=&claims=&policy= which throws a All I want is an access token to then use in a request to an API. What the hell is this /MicrosoftIdentity/Account/Challenge page and wtf am I supposed to do with it?! |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 5 replies
-
in your code: services.Configure<OpenIdConnectOptions>(OpenIdConnectDefaults.AuthenticationScheme, options => {
}
Did you try without this bloc for the moment? services.AddAuthorization(authorizationOptions =>
{
authorizationOptions.AddPolicy(
App.Policies.CanManageUsers,
App.Policies.CanManageUsersPolicy());
}); |
Beta Was this translation helpful? Give feedback.
-
Hello, I was having same problem, but in .NET 8. |
Beta Was this translation helpful? Give feedback.
@ataraxia89
in your code:
Did you try without this bloc for the moment?