8000
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2d9e4a2 commit bbf169bCopy full SHA for bbf169b
deviceauth.go
@@ -58,6 +58,8 @@ func (c *DeviceAuthResponse) UnmarshalJSON(data []byte) error {
58
type Alias DeviceAuthResponse
59
aux := &struct {
60
ExpiresIn int64 `json:"expires_in"`
61
+ // workaround misspelling of verification_uri
62
+ VerificationURL string `json:"verification_url"`
63
*Alias
64
}{
65
Alias: (*Alias)(c),
@@ -68,6 +70,9 @@ func (c *DeviceAuthResponse) UnmarshalJSON(data []byte) error {
68
70
if aux.ExpiresIn != 0 {
69
71
c.Expiry = time.Now().UTC().Add(time.Second * time.Duration(aux.ExpiresIn))
72
}
73
+ if c.VerificationURI == "" {
74
+ c.VerificationURI = aux.VerificationURL
75
+ }
76
return nil
77
78
0 commit comments