Replies: 4 comments 2 replies
-
|
IdentityServer does not do anything in particular to add nor filter away the In your Blazor app, when configuring the OpenIdConnect authentication scheme, is there a line to disable builder.Services.AddAuthentication(options =>
{
options.DefaultScheme = "cookie";
options.DefaultChallengeScheme = "oidc";
options.DefaultSignOutScheme = "oidc";
})
.AddCookie("cookie", options =>
{
options.Cookie.Name = "__Host-blazor";
options.Cookie.SameSite = SameSiteMode.Lax;
})
.AddOpenIdConnect("oidc", options =>
{
options.Authority = "https://demo.duendesoftware.com";
options.ClientId = "interactive.confidential";
options.ClientSecret = "secret";
options.ResponseType = "code";
options.ResponseMode = "query";
options.GetClaimsFromUserInfoEndpoint = true;
options.SaveTokens = true;
options.MapInboundClaims = false; // <-- this is the one
options.Scope.Clear();
options.Scope.Add("openid");
options.Scope.Add("profile");
options.Scope.Add("api");
options.Scope.Add("offline_access");
options.TokenValidationParameters.NameClaimType = "name";
options.TokenValidationParameters.RoleClaimType = "role";
});If you do not have that line "http://schemas.microsoft.com/identity/claims/identityprovider": "external-idp" |
Beta Was this translation helpful? Give feedback.
-
|
I have not set If I subclass the |
Beta Was this translation helpful? Give feedback.
-
|
I have MS's scaffolded pages in my IdentityServer projet and when logged in the user has the Now if I launch my app and navigate to a page that requires authorisation then I am redirected to log in and hit a breakpoint in
The If I now go to an IdentityServer page --- where am now logged in --- the |
Beta Was this translation helpful? Give feedback.
-
|
Bloody hell at last. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
I have a C# Blazor application with a corresponding
Clientthat is authorising usingcodeflow.Running
IdentityServerin debug mode I can see that when the user logs in using an external provider the correspondingidpclaim is set for the user in the IdentityServer website.However, this claim is not being passed to the client, which needs it.
I have created a
Scopefor the client and addedidpto theApiScopeClaimsbut that hasn't done it.Nor has also creating an
ApiResourceand addingidpto theApiResourceClaims.How do I get IdentityServer to send the
ipdclaim to the client?Beta Was this translation helpful? Give feedback.
All reactions