auth0 / auth0-cli

Build, manage and test your Auth0 integrations from the command line
https://auth0.github.io/auth0-cli/
MIT License
243 stars 52 forks source link

Generating token via CLI does not work with custom domains #956

Open pjain11 opened 8 months ago

pjain11 commented 8 months ago

Checklist

Describe the problem you'd like to have solved

I'm trying to generate token via auth0 CLI and the generated token places issuer value as being "TENANT_NAME.us.auth0.com" vs. Custom domain. We tried the following commands w/o any success:

auth0 login --tenant CUSTOM_DOMAIN_VALUE auth0 test token --tenant CUSTOM_DOMAIN_VALUE

If we go via authorize url, use the base as CUSTOM_DOMAIN, the generated token correctly contains the ISSUER value being CUSTOM_DOMAIN. How to achieve this behavior via auth0 CLI?

Here's sample authorize url format that works: https://CUSTOM_DOMAIN_VAL/authorize?response_type=token&client_id=CLIENT_ID_VALUE&redirect_uri=https://jwt.io&audience=MY_AUDIENCE_VAL&state=YOUR_STATE_VALUE

Describe the ideal solution

In the enterprise setup, using custom domain is very normal. CLI provides good way to generate tokens w/o writing extra code. Being able to generate token via CLI using custom domain will simplify the dev flow.

Alternatives and current workarounds

No response

Additional context

No response

pjain11 commented 1 month ago

Any update?