Skip to content

Commit

Permalink
Fix oauth token when a config file is used (#430)
Browse files Browse the repository at this point in the history
  • Loading branch information
optik-aper authored Mar 15, 2024
1 parent 2f08b29 commit 24277f4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/cli/cli.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ func (b *Base) configureClient(apiKey, userAgent string) {
b.Client = govultr.NewClient(nil)
} else {
config := &oauth2.Config{}
ts := config.TokenSource(context.Background(), &oauth2.Token{AccessToken: apiKey})
ts := config.TokenSource(context.Background(), &oauth2.Token{AccessToken: token})
b.Client = govultr.NewClient(oauth2.NewClient(context.Background(), ts))
b.HasAuth = true
}
Expand Down

0 comments on commit 24277f4

Please sign in to comment.