From 1a541691a513e82e5e825d3eab602b65629733fa Mon Sep 17 00:00:00 2001 From: "Jorge L. Fatta" Date: Fri, 23 Apr 2021 14:20:15 -0300 Subject: [PATCH] fix: polling faster error #252 --- internal/auth/auth.go | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/internal/auth/auth.go b/internal/auth/auth.go index 866e6b134..94dde77cf 100644 --- a/internal/auth/auth.go +++ b/internal/auth/auth.go @@ -14,10 +14,11 @@ import ( ) const ( - clientID = "2iZo3Uczt5LFHacKdM0zzgUO2eG2uDjT" - deviceCodeEndpoint = "https://auth0.auth0.com/oauth/device/code" - oauthTokenEndpoint = "https://auth0.auth0.com/oauth/token" - audiencePath = "/api/v2/" + clientID = "2iZo3Uczt5LFHacKdM0zzgUO2eG2uDjT" + deviceCodeEndpoint = "https://auth0.auth0.com/oauth/device/code" + oauthTokenEndpoint = "https://auth0.auth0.com/oauth/token" + audiencePath = "/api/v2/" + waitThresholdInSeconds = 3 // namespace used to set/get values from the keychain SecretsNamespace = "auth0-cli" @@ -59,7 +60,7 @@ type State struct { } func (s *State) IntervalDuration() time.Duration { - return time.Duration(s.Interval) * time.Second + return time.Duration(s.Interval+waitThresholdInSeconds) * time.Second } // Start kicks-off the device authentication flow