Skip to content

fix(auth): stop false OAuth2 no-credentials warning without --app#86

Merged
santiagomed merged 1 commit into
mainfrom
fix/oauth2-default-app-warning
Jul 16, 2026
Merged

fix(auth): stop false OAuth2 no-credentials warning without --app#86
santiagomed merged 1 commit into
mainfrom
fix/oauth2-default-app-warning

Conversation

@santiagomed

Copy link
Copy Markdown
Collaborator

Summary

  • xurl auth oauth2 without --app always warned that the "default" app had no client credentials, even when the real default_app (e.g. app-2) already had them.
  • Root cause: the check used GetApp(""), which is an empty-key map lookup and always returns nil, instead of resolving default_app.
  • Fix resolves the active default app, only warns when that app lacks credentials while another has them, and names the real target app in the message. Adds unit coverage.

Test plan

  • go test ./cli/ -count=1
  • xurl auth oauth2 with a credentialed default_app and no --app → no false warning
  • xurl auth oauth2 when default app has no credentials but another app does → warning names the real default app

The check used GetApp("") which never resolves the default app, so it always
warned when any other app had credentials. Resolve default_app correctly and
name that app in the warning.
@m-rosinsky m-rosinsky assigned m-rosinsky and unassigned m-rosinsky Jul 16, 2026
@m-rosinsky m-rosinsky self-requested a review July 16, 2026 00:17
@santiagomed santiagomed merged commit 3a4fed5 into main Jul 16, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants