File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -57,7 +57,8 @@ func (d DeviceAuthResponse) MarshalJSON() ([]byte, error) {
57
57
func (c * DeviceAuthResponse ) UnmarshalJSON (data []byte ) error {
58
58
type Alias DeviceAuthResponse
59
59
aux := & struct {
60
- ExpiresIn int64 `json:"expires_in"`
60
+ ExpiresIn int64 `json:"expires_in"`
61
+ VerificationURL string `json:"verification_url"`
61
62
* Alias
62
63
}{
63
64
Alias : (* Alias )(c ),
@@ -68,6 +69,10 @@ func (c *DeviceAuthResponse) UnmarshalJSON(data []byte) error {
68
69
if aux .ExpiresIn != 0 {
69
70
c .Expiry = time .Now ().UTC ().Add (time .Second * time .Duration (aux .ExpiresIn ))
70
71
}
72
+ // some services return verification_url instead of verification_uri
73
+ if c .VerificationURI == "" && aux .VerificationURL != "" {
74
+ c .VerificationURI = aux .VerificationURL
75
+ }
71
76
return nil
72
77
}
73
78
You can’t perform that action at this time.
0 commit comments