X Tutup
Skip to content

Commit 5f86481

Browse files
committed
Fix handling of HTTP 403 in Device Flow detection
1 parent 091d550 commit 5f86481

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

auth/oauth.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ func (oa *OAuthFlow) ObtainAccessToken() (accessToken string, err error) {
6969
}
7070
}
7171

72-
if resp.StatusCode == http.StatusUnauthorized || resp.StatusCode == http.StatusPaymentRequired ||
72+
if resp.StatusCode == http.StatusUnauthorized || resp.StatusCode == http.StatusForbidden ||
7373
resp.StatusCode == http.StatusNotFound || resp.StatusCode == http.StatusUnprocessableEntity ||
7474
(resp.StatusCode == http.StatusBadRequest && values != nil && values.Get("error") == "unauthorized_client") {
7575
// OAuth Device Flow is not available; continue with OAuth browser flow with a

0 commit comments

Comments
 (0)
X Tutup