Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

.AddClaim/ .AddClaims throws an error when multiple claims of the same type are Added #303

Closed
duhowise opened this issue Dec 7, 2020 · 7 comments
Assignees
Labels

Comments

@duhowise
Copy link

duhowise commented Dec 7, 2020

A user can have multiple of certain claim types eg: Roles
This is currently not possible as the library requires that claims added are unique.
Is there a way to turn this off?

@abatishchev
Copy link
Member

What are you trying to achieve? To add an array as the value of a claim?

@abatishchev abatishchev self-assigned this Dec 8, 2020
@abatishchev
Copy link
Member

You can try using AddClaim(name, arr) for that purpose. Underneath this method is Dictionary<string, object> so the key must be unique.

@abatishchev
Copy link
Member

@duhowise, have you figured this out? Do you need any more help or any changes made to the lon? I'm happy to discuss.

@duhowise
Copy link
Author

Oh yes I tried your suggested approach and it worked

@abatishchev
Copy link
Member

Cool! Hope you'll continue using this library. Please feel free to post more questions or suggestions.

@duhowise
Copy link
Author

I can close the issue now?

@abatishchev
Copy link
Member

No worries, I've closed it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

No branches or pull requests

2 participants