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 810f995 commit 89f4cefCopy full SHA for 89f4cef
auth/token.go
@@ -73,7 +73,9 @@ func NewTokenClient() *TokenClient {
73
func (tc *TokenClient) GetToken() (Token, error) {
74
tokenType := tc.GetTokenType()
75
if tokenType != BearerToken {
76
- return Token{Type: tokenType, Value: os.Getenv(EnvVarCloudQueryAPIKey)}, nil
+ tokenFromEnv := os.Getenv(EnvVarCloudQueryAPIKey)
77
+ trimmedToken := strings.TrimSpace(tokenFromEnv)
78
+ return Token{Type: tokenType, Value: trimmedToken}, nil
79
}
80
81
// If the token is not expired, return it
0 commit comments