From ac571fa341c2a2b979d2b2c8341fd24767ef5d47 Mon Sep 17 00:00:00 2001 From: Patrik Lundin Date: Thu, 13 Feb 2025 07:38:29 +0000 Subject: [PATCH] oauth2: fix docs for Config.DeviceAuth Config.DeviceAccess should be Config.DeviceAuth when using GenerateVerifier() or S256ChallengeOption() Change-Id: Ie21a808387f731d270ae54ea1705de3e786cad7f GitHub-Last-Rev: 2d6b4fd736ce785cc1675b1963be165529b09b1f GitHub-Pull-Request: golang/oauth2#763 Reviewed-on: https://go-review.googlesource.com/c/oauth2/+/636216 Reviewed-by: Dmitri Shuralyov Reviewed-by: Cherry Mui LUCI-TryBot-Result: Go LUCI Auto-Submit: Jorropo Reviewed-by: Jorropo --- pkce.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkce.go b/pkce.go index 50593b6df..6a95da975 100644 --- a/pkce.go +++ b/pkce.go @@ -21,7 +21,7 @@ const ( // // A fresh verifier should be generated for each authorization. // S256ChallengeOption(verifier) should then be passed to Config.AuthCodeURL -// (or Config.DeviceAccess) and VerifierOption(verifier) to Config.Exchange +// (or Config.DeviceAuth) and VerifierOption(verifier) to Config.Exchange // (or Config.DeviceAccessToken). func GenerateVerifier() string { // "RECOMMENDED that the output of a suitable random number generator be @@ -51,7 +51,7 @@ func S256ChallengeFromVerifier(verifier string) string { } // S256ChallengeOption derives a PKCE code challenge derived from verifier with -// method S256. It should be passed to Config.AuthCodeURL or Config.DeviceAccess +// method S256. It should be passed to Config.AuthCodeURL or Config.DeviceAuth // only. func S256ChallengeOption(verifier string) AuthCodeOption { return challengeOption{