Default PKCE method when missing

Co-authored-by: HFO4 <16058869+HFO4@users.noreply.github.com>
copilot/fix-oauth2-validation-issues
copilot-swe-agent[bot] 3 weeks ago
parent 0da65dcbf3
commit 541f0e119f

@ -60,6 +60,9 @@ func (s *GrantService) Get(c *gin.Context) (*GrantResponse, error) {
user := inventory.UserFromContext(c)
kv := dep.KV()
oAuthClient := dep.OAuthClientClient()
if s.CodeChallenge != "" && s.CodeChallengeMethod == "" {
s.CodeChallengeMethod = "S256"
}
// 1. Get app registration and grant
app, err := oAuthClient.GetByGUIDWithGrants(c, s.ClientID, user.ID)

Loading…
Cancel
Save