Skip to content

Commit 9167791

Browse files
committed
(fix/cleanup) Remove old/redundant code and fix the oauth tests
1 parent e352416 commit 9167791

File tree

3 files changed

+132
-463
lines changed

3 files changed

+132
-463
lines changed

pkg/oauth/oauth.go

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -143,20 +143,6 @@ func LoadOAuthSecrets() (*OAuthSecrets, error) {
143143
return &secrets, nil
144144
}
145145

146-
// GetValidAccessToken returns a valid access token if available, otherwise returns empty string
147-
func GetValidAccessToken() string {
148-
secrets, err := LoadOAuthSecrets()
149-
if err != nil {
150-
return ""
151-
}
152-
153-
if secrets.IsValid() {
154-
return secrets.AccessToken
155-
}
156-
157-
return ""
158-
}
159-
160146
// HasOAuthCredentials checks if OAuth credentials are present
161147
func HasOAuthCredentials() bool {
162148
_, err := LoadOAuthSecrets()

0 commit comments

Comments
 (0)