Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature Request: Support a flag to specify whether to authenticate as a user or machine #772

Open
1 task done
evansims opened this issue Jun 20, 2023 · 2 comments
Open
1 task done
Labels
feature request A feature has been asked for or suggested by the community

Comments

@evansims
Copy link
Member

Checklist

Describe the problem you'd like to have solved

While recently updating our quickstart guides to use the CLI, I noted an area of improvement that would be great to address.

It would be helpful if users could provide a command line flag when using the login command to specify whether to authenticate as a user or machine rather than requiring input. This would simplify our documentation by keeping guidance in a copy-and-paste format without extra direction and reducing the chances of a user overlooking said direction and needing clarification on which to choose (which has happened, based on recent QS feedback.)

Describe the ideal solution

auth0 login accepts a command line flag to specify signing in as a user or machine without input.

Perhaps something like auth0 login --as user/auth0 login --as machine, or a direct alias like auth0 login --user/auth0 login --machine.

Alternatives and current workarounds

No response

Additional context

No response

@evansims evansims added the feature request A feature has been asked for or suggested by the community label Jun 20, 2023
@willvedd
Copy link
Contributor

Dear valued user,

We had considered those exact flags during initial implementation of the login function. However, we realized that there were flags that allowed you to "skip" the choice of login mechanism:

As User: auth0 login --domain <tenant-domain> --client-id <client-id> --client-secret <client-secret>

As Machine: auth0 login --no-input

Admittedly, the --no-input flag is not immediately intuitive and a --as-user could certainly be added in the future.

Does the above help?

@evansims
Copy link
Member Author

evansims commented Jun 20, 2023

Hey @willvedd! 😆

Thanks! And I gotcha, that decision makes total sense. We are, admittedly, kind of applying the CLI in a use case it wasn't initially planned of being used for, I think. There are bound to be situations like this.

Thanks for the guidance examples! The "as user" guidance example you provided would work, but at least for this use case, where we have a lot of first-time users coming to Auth0 with clean tenants and unfamiliarity with the processes, it would be problematic from a DX perspective.

It would require considerably more work for the end user to craft the command, and guidance from ourselves in how to craft it, meaning lengthier quickstarts and READMEs, and more opportunity for errors by users during configuration.

There's a bit of a chicken-and-the-egg situation, too, for this use case. If you take a look at a quickstart that uses the CLI, as an example, users won't have the information necessary to craft the authentication command as you demo'd beforehand: https://auth0.com/docs/quickstart/webapp/laravel/01-login#sdk-configuration

(No fires on this (and my other) suggestion by the way, just rough areas I noticed that we could consider improving to ease CLI adoption for use with the SDKs! Just something to consider. ❤️)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request A feature has been asked for or suggested by the community
Projects
None yet
Development

No branches or pull requests

2 participants