Skip to content

Commit

Permalink
Continue polling on a 400 "slow_down"
Browse files Browse the repository at this point in the history
Closes #199
  • Loading branch information
monde committed Jul 8, 2024
1 parent b3f28ab commit 15aaa88
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion internal/webssoauth/webssoauth.go
Original file line number Diff line number Diff line change
Expand Up @@ -948,7 +948,7 @@ func (w *WebSSOAuthentication) accessToken(deviceAuth *okta.DeviceAuthorization)
if err != nil {
return backoff.Permanent(fmt.Errorf("fetching access token polling received unexpected API error body %q", string(bodyBytes)))
}
if apiErr.ErrorType != "authorization_pending" {
if apiErr.ErrorType != "authorization_pending" && apiErr.ErrorType != "slow_down" {
return backoff.Permanent(fmt.Errorf("fetching access token polling received unexpected API polling error %q - %q", apiErr.ErrorType, apiErr.ErrorDescription))
}

Expand Down

0 comments on commit 15aaa88

Please sign in to comment.