dotnet / dotnet/AspNetCore.Docs

Explain where the JWT secret is stored when using default settings

Open
#29,584 1 comment 0 reactions 1 assignee Assigned to @mkArtakMSFT View on GitHub
doc-enhancement re-Aditya Source - Docs.ms
Dominant language
C#
Stars
13.1k
Forks
24.6k
Avg merge
1d 3h
Merged PRs (30d)
97

Description

The documentation uses the default `.AddJwtBearer()` method without any options. However, the JWTs generated are signed and the signature is validated somehow. Wouldn't this require the public key to be stored somewhere for the API to verify the given signature? Where is it stored?

---
#### Document Details

⚠ *Do not edit this section. It is required for learn.microsoft.com ➟ GitHub issue linking.*

* ID: f76a2aaf-732a-f686-343b-d811faa43d44
* Version Independent ID: f76a2aaf-732a-f686-343b-d811faa43d44
* Content: [Generate tokens with dotnet user-jwts](https://learn.microsoft.com/en-us/aspnet/core/security/authentication/jwt-authn?view=aspnetcore-7.0&tabs=windows)
* Content Source: [aspnetcore/security/authentication/jwt-authn.md](https://github.com/dotnet/AspNetCore.Docs/blob/main/aspnetcore/security/authentication/jwt-authn.md)
* Product: **aspnet-core**
* Technology: **aspnetcore-security**
* GitHub Login: @Rick-Anderson
* Microsoft Alias: **riande**

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.