Skip to content

Conversation

ramya18101
Copy link
Contributor

@ramya18101 ramya18101 commented Jun 9, 2025

🔧 Changes

Add support to use tenant credentials details from the local file with the command : auth0 login --profile <tenant-profile

📚 References

#1234

🔬 Testing

📝 Checklist

  • All new/changed/fixed functionality is covered by tests (or N/A)
  • I have added documentation for all new/changed functionality (or N/A)

@ramya18101 ramya18101 marked this pull request as ready for review June 9, 2025 06:22
@ramya18101 ramya18101 requested a review from a team as a code owner June 9, 2025 06:22
@kushalshit27 kushalshit27 requested a review from Copilot June 10, 2025 06:54
Copilot

This comment was marked as outdated.

**Example:**

```ini
[default]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's better if profiles can use common variable across profile

example:

[common]
tenant = your-tenant.auth0.com

[dev-profile-1]
client_id = YOUR_CLIENT_ID_1
client_secret = YOUR_CLIENT_SECRET_1

[dev-profile-2]
client_id = YOUR_DEV_CLIENT_ID_2
client_secret = YOUR_DEV_CLIENT_SECRET_2

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • show the list of current profiles
--profile ls

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. In most cases, we log in using different tenants, and each profile can correspond to a different tenant. So, I don't see much value in having a common one.

  2. Profiles are manually stored locally by the user, so I see less benefit in supporting a list command just to view what they’ve explicitly added to their local file.
    Besides, we already have the tenants ls command to view currently logged-in tenants.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • Using common variable is a very standard and useful pattern example, .gitconfig (core)
  • --profile ls is or --profile <profile-name> will improve cli experience.

@codecov-commenter
Copy link

Codecov Report

Attention: Patch coverage is 20.40816% with 39 lines in your changes missing coverage. Please review.

Project coverage is 65.38%. Comparing base (3f49393) to head (9702c68).
Report is 4 commits behind head on main.

Files with missing lines Patch % Lines
internal/cli/login.go 20.40% 34 Missing and 5 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1246      +/-   ##
==========================================
- Coverage   65.50%   65.38%   -0.12%     
==========================================
  Files         108      108              
  Lines       16351    16390      +39     
==========================================
+ Hits        10711    10717       +6     
- Misses       4995     5025      +30     
- Partials      645      648       +3     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants