You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
UX: auto-promote or warn when only one app has credentials but isn't the default #66
When a user runs xurl auth apps add my-app --client-id ... --client-secret ... followed by xurl auth oauth2 (without --app my-app), the OAuth token is saved to the built-in default app profile — which has no client-id or client-secret. All subsequent commands fail with auth errors even though the OAuth flow appeared to succeed.
This is the #1 setup pitfall we see across users integrating xurl with AI agents (Hermes Agent, OpenClaw, Claude Code). Multiple independent write-ups have documented it:
If exactly one non-default app has both client-id and client-secret configured, auto-select it (or prompt the user to confirm). The empty default profile should not win by default when a configured app exists.
If multiple apps exist but none is set as default, show a warning like:
Warning: No default app set. Use "xurl auth default <app>" to set one.
Available apps with credentials: my-app, prod-app
Alternatively, if the default app has no client-id/client-secret, refuse to proceed and suggest --app <name> with the list of configured apps.
Any of these would eliminate the most common xurl setup failure. The current behavior — silently saving a token to an empty profile — gives users a false success signal.
Workaround
Users must explicitly specify --app on every auth command:
This appears resolved on current main by #74, with the default-app lookup corrected in #86. When --app is omitted and the selected app lacks credentials, xurl lists credentialed apps and suggests xurl auth oauth2 --app <name>.
Verified with:
go test ./cli -run TestOAuth2NoAppCredentialWarning -v
go test ./...
go build ./...
The issue can be closed unless automatic single-app selection is still desired.
Activity
sanmaxdev commentedon Jul 16, 2026
This appears resolved on current
mainby #74, with the default-app lookup corrected in #86. When--appis omitted and the selected app lacks credentials, xurl lists credentialed apps and suggestsxurl auth oauth2 --app <name>.Verified with:
go test ./cli -run TestOAuth2NoAppCredentialWarning -vgo test ./...go build ./...The issue can be closed unless automatic single-app selection is still desired.