Skip to content
This repository has been archived by the owner on Dec 14, 2017. It is now read-only.

UpdateClaims not working properly? #528

Open
brockallen opened this issue Jun 4, 2015 · 3 comments
Open

UpdateClaims not working properly? #528

brockallen opened this issue Jun 4, 2015 · 3 comments
Assignees
Labels

Comments

@brockallen
Copy link
Owner

No description provided.

@brockallen brockallen self-assigned this Jun 4, 2015
@rvdkooy
Copy link
Contributor

rvdkooy commented Jun 7, 2015

I'm getting a null exception when doing CreateUserAsync and then calling AddUserClaimAsync on the IdentityManagerService.
This is because the claimscollections of the useraccount is null when creating a new user:
https://github.com/brockallen/BrockAllen.MembershipReboot/blob/master/src/BrockAllen.MembershipReboot/Account/Relational/RelationalUserAccount.cs#L21

Only when I have a new database session and the user is retrieved from the db again I can call UpdateClaimsAsync again. (ClaimsCollection is set to an empty collection by EF??)

Is this related you think?

@brockallen
Copy link
Owner Author

Perhaps -- I was trying to use this API last week and it just wasn't working as expected. I have yet to really debug into it.

@brockallen brockallen added the todo label Jun 8, 2015
@skasti
Copy link

skasti commented Mar 21, 2016

UpdateClaims adds new claims instead of updating existing ones in my case...
EDIT: Aha, so update means "add some, delete some, but only when specified"... I thought it was a smart way to update claims. silly me.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

3 participants