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 18352fc commit 14b275cCopy full SHA for 14b275c
deviceauth.go
@@ -59,6 +59,8 @@ func (c *DeviceAuthResponse) UnmarshalJSON(data []byte) error {
59
type Alias DeviceAuthResponse
60
aux := &struct {
61
ExpiresIn int64 `json:"expires_in"`
62
+ // workaround misspelling of verification_uri
63
+ VerificationURL string `json:"verification_url"`
64
*Alias
65
}{
66
Alias: (*Alias)(c),
@@ -69,6 +71,9 @@ func (c *DeviceAuthResponse) UnmarshalJSON(data []byte) error {
69
71
if aux.ExpiresIn != 0 {
70
72
c.Expiry = time.Now().UTC().Add(time.Second * time.Duration(aux.ExpiresIn))
73
}
74
+ if c.VerificationURI == "" {
75
+ c.VerificationURI = aux.VerificationURL
76
+ }
77
return nil
78
79
0 commit comments