Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion api/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -346,7 +346,9 @@ func (c *ApiClient) getAuthHeader(method, url string, authType string, username
}

// If no auth type is specified, try to use the first OAuth2 token
token := c.auth.TokenStore.GetFirstOAuth2Token()
// Use ForApp variants so the active app name (set via --app) is respected.
// -dr. Q
token := c.auth.TokenStore.GetFirstOAuth2TokenForApp(c.auth.AppName())
if token != nil {
accessToken, err := c.auth.GetOAuth2Header(username)
if err == nil {
Expand Down