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

--force and --no-input have no effect #343

Closed
AndrewRayCode opened this issue Aug 2, 2021 · 3 comments · Fixed by #349
Closed

--force and --no-input have no effect #343

AndrewRayCode opened this issue Aug 2, 2021 · 3 comments · Fixed by #349
Labels
bug This points to a verified bug in the code

Comments

@AndrewRayCode
Copy link

AndrewRayCode commented Aug 2, 2021

Description

--force and --no-input still prompt you to open a browser

Reproduction

I'm trying to run a command to get a token to test with automatically:

auth0 test login MY_CLIENT_ID --no-input --force --domain MY_DOMAIN

This outputs:

▸ A browser window will open to begin this client's login flow.
▸ Once login is complete, you can return to the CLI to view user profile information and tokens.

▸ The client you are using does not currently allow callbacks to localhost.
▸ To complete the login flow the CLI needs to redirect logins to a local server and record the result.

▸ The client will be modified to update the allowed callback URLs, we'll remove them when done.
▸ If you do not wish to modify the client, you can abort now.

Do you wish to proceed? (y/N)

According to the documentation from auth0 help test login:

      --force           Skip confirmation.
      --no-input        Disable interactivity.

This documentation isn't clear on what's supposed to happen, it is quite confusing. Either way, neither flag's supposed explanation is being followed, there is both a confirmation and it's interactive.

Environment

Please provide the following:

  • Version of this library used:
    auth0 --version
    auth0 version 0.6.0 b69b35a

  • Version of the platform or framework used, if applicable:
    Mac Big Sur, iTerm2

@Widcket
Copy link
Contributor

Widcket commented Aug 4, 2021

Hi @AndrewRayCode, thanks for raising this. The test login command requires interactivity, because the login is browser-based. Therefore, the global flag --no-input has no effect. However, --force should work and open the browser tab directly without a confirmation prompt.
I'll leave this issue open to track that.

@Widcket Widcket added the bug This points to a verified bug in the code label Aug 4, 2021
@Widcket
Copy link
Contributor

Widcket commented Aug 4, 2021

I'm trying to run a command to get a token to test with automatically

If you wish to obtain a test token, you can use the auth0 test token command.
E.g. auth0 test token --audience "some-api"

@Widcket
Copy link
Contributor

Widcket commented Sep 22, 2021

The fix to have test login and test token honor the --force flaag is now out in v0.11.0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug This points to a verified bug in the code
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants