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

user-jwts cannot handle multiple claims with the same name #59671

Open
1 task done
smfields opened this issue Dec 31, 2024 · 0 comments
Open
1 task done

user-jwts cannot handle multiple claims with the same name #59671

smfields opened this issue Dec 31, 2024 · 0 comments
Labels
area-commandlinetools Includes: Command line tools, dotnet-dev-certs, dotnet-user-jwts, and OpenAPI

Comments

@smfields
Copy link

Is there an existing issue for this?

  • I have searched the existing issues

Describe the bug

When a JWT has multiple claims with the same name (type) then most applications will create that claim as an array. One example is Auth0 which generates tokens with a "permissions" claim that is an array of permissions that the user has. Currently there does not appear to be a way to generate similar JWTs using user-jwts because it prohibits creating multiple claims with the same name.

dotnet user-jwts create --claim permissions=read --claim permissions=write

An item with the same key has already been added. Key: permissions

Expected Behavior

No response

Steps To Reproduce

dotnet user-jwts create --claim permissions=read --claim permissions=write

Exceptions (if any)

An item with the same key has already been added. Key: permissions

.NET Version

9.0.101

Anything else?

No response

@martincostello martincostello added area-commandlinetools Includes: Command line tools, dotnet-dev-certs, dotnet-user-jwts, and OpenAPI and removed area-security labels Jan 1, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-commandlinetools Includes: Command line tools, dotnet-dev-certs, dotnet-user-jwts, and OpenAPI
Projects
None yet
Development

No branches or pull requests

2 participants