Is there any way to get the First Name and Last Name and such fields that show up in IdentityManager while using Membership Reboot as the user/claims store to come down via claims or some other method to be used in IDS clients? I have had to manually add claims for the first / last names (given_name and family_name). I do have the profile scope included in my application in both the IDS and client configuration. Authentication and everything else appears to be working nicely. Any help would be greatly appreciated.
Asked
Active
Viewed 694 times
1 Answers
2
Frankly, I haven't done this. But I would look into https://identityserver.github.io/Documentation/docsv2/advanced/userService.html GetProfileDataAsync
method.
MR implementation is here(https://github.com/IdentityServer/IdentityServer3.MembershipReboot/blob/master/source/IdentityServer3.MembershipReboot/IdentityServer3.MembershipReboot.cs). You should be able to push FirstName and LastName properties as open-id claims inside GetProfileDataAsync
method.

rawel
- 2,923
- 21
- 33
-
2This was such a pain in the butt! Nobody documents this anywhere! It turns out you are right - I implemented this in the MembershipRebootUserService.GetClaimsFromAccount function (called in GetProfileDataAsync) by getting the FirstName and LastName property as defined in the CustomUser class from the IdentityManager.MembershipReboot project via Reflection/Type Introspection and then creating the appropriate given_name and family_name claims. What a pain. This SHOULD be documented more thoroughly or some example should exist!!!!!! @brockallen – Pugz Jul 06 '16 at 20:14
-
@pugz Thanks for sharing your experience! – rawel Jul 07 '16 at 00:25