Fix handling of HTTP 403 in Device Flow detection
This commit is contained in:
parent
091d550cde
commit
5f8648159d
1 changed files with 1 additions and 1 deletions
|
|
@ -69,7 +69,7 @@ func (oa *OAuthFlow) ObtainAccessToken() (accessToken string, err error) {
|
|||
}
|
||||
}
|
||||
|
||||
if resp.StatusCode == http.StatusUnauthorized || resp.StatusCode == http.StatusPaymentRequired ||
|
||||
if resp.StatusCode == http.StatusUnauthorized || resp.StatusCode == http.StatusForbidden ||
|
||||
resp.StatusCode == http.StatusNotFound || resp.StatusCode == http.StatusUnprocessableEntity ||
|
||||
(resp.StatusCode == http.StatusBadRequest && values != nil && values.Get("error") == "unauthorized_client") {
|
||||
// OAuth Device Flow is not available; continue with OAuth browser flow with a
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue