dotnet / dotnet/aspnetcore

Allow the `sub` for a user-jwt to be set, independent of the `name`

Open
#61,773 0 comments 0 reactions 0 assignees View on GitHub
area-commandlinetools feature-userjwts
Dominant language
C#
Stars
38.4k
Forks
10.9k
Avg merge
2d 10h
Merged PRs (30d)
281

Description

### Is there an existing issue for this?

- [x] I have searched the existing issues

### Is your feature request related to a problem? Please describe the problem.

I want to create a user-jwt with a specific `sub`, but when I do the following:

```sh
dotnet user-jwts create --claim "sub=1" --valid-for 3650d
```

The `sub` ends up as:

```json
"sub": [
"Glen",
"1"
]
```

The name should not be included in the `sub` if there is already a value.

### Describe the solution you'd like

Avoid inserting a value for `sub` if one has already been set.

### Additional context

_No response_

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.