DuendeSoftware / Support

Support for Duende Software products
21 stars 0 forks source link

Customizing the idp claim's value with ASP.NET Core Identity Integration #1486

Closed lbrunshh closed 3 days ago

lbrunshh commented 1 week ago

IdentityServer 7.0.8 .NET 8

When integrating with ASP.NET Core Identity (As per Quickstart 5 on Duende docs) if a user authenticates using an account registered through ASP.NET Core Identity the returned token to the client has the idp claim value set to "local". Is there any options in startup to customize the idp claim value if authenticated through the "local" ASP.NET Core Identity integration? And if not is there a workaround to set it to a custom value? Thanks.

Image

RolandGuijt commented 4 days ago

When the idp claim is set to "local" it means the user was authenticated directly by the identity provider the client is using. Any other value indicates that an external identity provider was used. This behavior is very difficult to change since IdentityServer uses a constant value for it. We also don't recommend to change it because parts of the protocol rely on the value. Such as logout. Changing it would mean replacing implementations for these.

lbrunshh commented 3 days ago

Gotcha, thank you for your response.