[oauth2] Fix DeviceAuth not populating RetrieveError

1 view
Skip to first unread message

Sean Liao (Gerrit)

unread,
Oct 21, 2025, 4:30:40 PM (2 days ago) Oct 21
to Andreas Goetz, Gerrit Bot, goph...@pubsubhelper.golang.org, golang-...@googlegroups.com, Dmitri Shuralyov, Dmitri Shuralyov, David Chase, Go LUCI, Jaana Dogan, Shin Fan, Cody Oss, Gopher Robot, golang-co...@googlegroups.com

Sean Liao submitted the change

Change information

Commit message:
x/oauth2: populate RetrieveError from DeviceAuth

Endpoints may return errors when attempting to request device
authorization. Currently, these error codes are ignored and an
otherwise empty RetrieveError returned. This change populates
the RetrieveError similar to the oauth2 token exchange.

Fixes golang/go#75759
Change-Id: Ic00fecce290d3d3b4a40697b54ce74cc8cacab4d
GitHub-Last-Rev: 32c6ab5b8c0f8c2624cba0d536224a1fefcf0665
GitHub-Pull-Request: golang/oauth2#794
Reviewed-by: David Chase <drc...@google.com>
Reviewed-by: Sean Liao <se...@liao.dev>
Reviewed-by: Dmitri Shuralyov <dmit...@google.com>
Files:
  • M deviceauth.go
  • M deviceauth_test.go
  • M oauth2_test.go
Change size: M
Delta: 3 files changed, 84 insertions(+), 3 deletions(-)
Branch: refs/heads/master
Submit Requirements:
  • requirement satisfiedCode-Review: +1 by Dmitri Shuralyov, +1 by David Chase, +2 by Sean Liao
  • requirement satisfiedTryBots-Pass: LUCI-TryBot-Result+1 by Go LUCI
Open in Gerrit
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: merged
Gerrit-Project: oauth2
Gerrit-Branch: master
Gerrit-Change-Id: Ic00fecce290d3d3b4a40697b54ce74cc8cacab4d
Gerrit-Change-Number: 709215
Gerrit-PatchSet: 8
Gerrit-Owner: Gerrit Bot <letsus...@gmail.com>
Gerrit-Reviewer: Cody Oss <cod...@google.com>
Gerrit-Reviewer: David Chase <drc...@google.com>
Gerrit-Reviewer: Dmitri Shuralyov <dmit...@google.com>
Gerrit-Reviewer: Jaana Dogan <j...@google.com>
Gerrit-Reviewer: Sean Liao <se...@liao.dev>
Gerrit-Reviewer: Shin Fan <shi...@google.com>
Gerrit-CC: Andreas Goetz <cpu...@gmail.com>
Gerrit-CC: Dmitri Shuralyov <dmit...@golang.org>
Gerrit-CC: Gopher Robot <go...@golang.org>
open
diffy
satisfied_requirement
Reply all
Reply to author
Forward
0 new messages