Update user-jwts to support new Identity bearer tokens
- Dominant language
- C#
- Stars
- 38.4k
- Forks
- 10.9k
- Avg merge
- 2d 10h
- Merged PRs (30d)
- 281
Description
We've added support to ASP.NET Core Identity in .NET 8 for included API endpoints that can issue authentication cookies or tokens. The `dotnet user-jwts` tool we added in .NET 7 should be updated to support this new token format so that it's simple to create authentication tokens that are stored in the project's user secrets location and be used in local dev scenarios.
Work required:
- [ ] Alias the tool to `dotnet user-tokens` so that both `user-jwts` and `user-tokens` are supported command invocations
- [ ] Add a new `--format` parameter to the `create` command that accepts `jwt` and `token` options, defaulting to `jwt` to maintain backwards compatibility with the existing behavior.
- [ ] Update the command help text to replace references to "JWT" with "token" as appropriate
Open questions:
- ❔Should the `--format` parameter accept a `cookie` value to enable creating valid Identity cookies?
- ❔Which existing options on `create` don't apply when `--format token` is specified, e.g. `--issuer`? The tool should fail and display a helpful error message if those are specified when using `--format token`
- ❔Are there any new options required on `create` for customizing the creation of tokens in the new format?
- ❔Are there any Data Protection related items to consider given that the new tokens are protected using the app's configured Data Protection settings?
Contributor guide
Assessment
This issue has not been assessed yet.