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

Unable to create an access token on Gitpod.io with the Auth0 CLI #965

Open
6 tasks done
mraible opened this issue Jan 17, 2024 · 0 comments
Open
6 tasks done

Unable to create an access token on Gitpod.io with the Auth0 CLI #965

mraible opened this issue Jan 17, 2024 · 0 comments
Assignees
Labels
bug This points to a verified bug in the code

Comments

@mraible
Copy link

mraible commented Jan 17, 2024

Checklist

  • I have looked into the README and have not found a suitable solution or answer.
  • I have looked into the documentation and have not found a suitable solution or answer.
  • I have searched the issues and have not found a suitable solution or answer.
  • I have upgraded to the latest version of this project and the issue still persists.
  • I have searched the Auth0 Community forums and have not found a suitable solution or answer.
  • I agree to the terms within the Auth0 Code of Conduct.

Description

I've started playing with Gitpod.io as a solution for our workshops. It's pretty awesome because SDKMAN and Homebrew are pre-installed, so I can easily install Java 21, the Auth0 CLI, and HTTPie. However, I'm having issues creating an access token using auth0 test token. auth0 login opens a text-based browser and is a real pain when you have MFA configured. auth0 login --no-input is a workaround.

The following will invoke a terminal browser, and you'll be stuck waiting for nothing to happen.

auth0 test token -a https://dev-06bzs1cu.us.auth0.com/api/v2/ -s opened

If you specify a client ID and --no-input, you can get a bit further with:

auth0 test token r6jm3HVTz12YmxRCdZ1rWTZNQST7gEvz -a https://dev-06bzs1cu.us.auth0.com/api/v2/ -s openid --no-input

This prompts you to open https://dev-06bzs1cu.us.auth0.com/authorize?audience=https%3A%2F%2Fdev-06bzs1cu.us.auth0.com%2Fapi%2Fv2%2F&client_id=r6jm3HVTz12YmxRCdZ1rWTZNQST7gEvz&redirect_uri=http%3A%2F%2Flocalhost%3A8484&response_type=code&scope=openid&state=UKRkmyGaMjvFRPuDlfuCGtKH8oDfC_mdmlOH8SmyAyDLM9Sfb24JSsqAx3_pIUkW__bq2imcJKi6dim57l2DKg.

If you change the redirect to go back to Gitpod, instead of localhost, it works. However, the Auth0 CLI is no longer running a server on port 8484 anymore.

It'd be cool if auth0 test token could somehow work like auth0 login --no-input where you can log in in a local browser window.

Here's a repo you can use to test things out. Just click on the Open in Gitpod button.

https://github.com/mraible/gitpod-java

Expectation

I'd like to be able to use auth0 test token and get an access token from a Gitpod shell.

Reproduction

Here's a repo you can use to test things out. Just click on the Open in Gitpod button.

https://github.com/mraible/gitpod-java

Then, run auth0 login --no-input to configure the CLI with your tenant. Then, try to create an access token.

Auth0 CLI version

1.3.0

@mraible mraible added the bug This points to a verified bug in the code label Jan 17, 2024
@ramya18101 ramya18101 self-assigned this Sep 30, 2024
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

No branches or pull requests

2 participants