Open davidharrigan opened 4 months ago
@davidharrigan Thank you David for the recommendation. We have updated the login flow to respect the domain flag now. Please note that since domain is a common param used by both machine login and user login, one should use the below command to login to a tenant directly in a user login flow:
auth0 login --domain <tenant domain> --no-input
The no-input
flag indicates that there will be no further input (client-id and client-secret) and hence cli evaluates it as a user login flow.
This shall be included in the next upcoming release.
thank you, looking forward to the next release :)
Checklist
Describe the problem you'd like to have solved
My Auth0 account has many tenants. Selecting the correct tenant from the authorization consent UI is doable, but would be nice if the
auth0 login --domain <tenant domain>
worked for the device code flow login.Describe the ideal solution
When
--domain
flag is provided for the device code login flow, the correct tenant is selected without having to search for it in the UI.Alternatives and current workarounds
No response
Additional context
I believe this would work if we can pass the
--domain
value to theaudience
field here: https://github.com/auth0/auth0-cli/blob/54e9a30eeb58a4a7e40e04dc19af6869036bfb32/internal/auth/auth.go#L153 instead of using the hardcoded wildcard audience defined here: https://github.com/auth0/auth0-cli/blob/54e9a30eeb58a4a7e40e04dc19af6869036bfb32/internal/auth/auth.go#L53