Skip to content

Commit fa1978c

Browse files
committed
1 parent 8c7208a commit fa1978c

File tree

2 files changed

+4
-7
lines changed

2 files changed

+4
-7
lines changed

deviceauth.go

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -89,11 +89,5 @@ func retrieveDeviceAuth(ctx context.Context, c *Config, v url.Values) (*DeviceAu
8989
}
9090

9191
_ = json.Unmarshal(body, &da.raw)
92-
93-
// Azure AD supplies verification_url instead of verification_uri
94-
if da.VerificationURI == "" {
95-
da.VerificationURI, _ = da.raw["verification_url"].(string)
96-
}
97-
9892
return da, nil
9993
}

oauth2.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -270,7 +270,10 @@ func (c *Config) Poll(ctx context.Context, da *DeviceAuthResponse, opts ...AuthC
270270
return tok, nil
271271
}
272272

273-
e, _ := err.(*RetrieveError)
273+
e, ok := err.(*RetrieveError)
274+
if !ok {
275+
return nil, err
276+
}
274277
switch e.ErrorCode {
275278
case errSlowDown:
276279
interval += 5

0 commit comments

Comments
 (0)