Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions internal/api/oauthserver/handlers.go
Original file line number Diff line number Diff line change
Expand Up @@ -267,6 +267,10 @@ type OAuthTokenParams struct {
func (s *Server) OAuthToken(w http.ResponseWriter, r *http.Request) error {
ctx := r.Context()

// Token responses carry credentials and must not be cached (OAuth 2.1 §3.2.3).
// Set before any response is written, so errors carry it too.
w.Header().Set("Cache-Control", "no-store")

var params OAuthTokenParams

// Handle both JSON and form-encoded requests
Expand Down
Loading