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

Login command in CLI does not respect --domain flag and INFISICAL_API_URL env var for self-hosted instances #2407

Open
Badbird5907 opened this issue Sep 11, 2024 · 2 comments
Labels
linear This tag is used to sync issues with Infisical's internal project management system.

Comments

@Badbird5907
Copy link

Badbird5907 commented Sep 11, 2024

Describe the bug

The Infisical CLI should respect the --domain flag/INFISICAL_API_URL environment variable, bypassing the manual domain entry for self-hosted instances during login. Currently, even when specifying these parameters, users are prompted to input the domain manually.

This would make the CLI more user & script-friendly, particularly in scenarios where shell scripts use the CLI, and the user's session expires.
I currently use this expect script in my shell scripts to automate the domain input.
A way to bypass the prompt (or a flag like --self-hosted) would eliminate the need for these workarounds.

To Reproduce

Steps to reproduce the behavior:

  1. Set INFISICAL_API_URL or --domain to a self-hosted instance
  2. run infisical login

Expected behavior

When using the CLI for a self-hosted instance, the flow should be entirely non-interactive after providing the necessary environment variables or flags (other than the user passing in the token).

For example:

$ export INFISICAL_API_URL="https://infisical.example.com/"
$ infisical login
✔ Self Hosting
Domain: https://infisical.example.com
To complete your login, open this address in your browser: https://infisical.example.com/login?callback_port=1234
...
Token: 

Screenshots

image
image

Platform you are having the issue on:

Linux

@Rishabhg71
Copy link

Can i take this issue?

@Dani4kor
Copy link

same here

infisical version 0.31.0

@maidul98 maidul98 added the linear This tag is used to sync issues with Infisical's internal project management system. label Sep 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
linear This tag is used to sync issues with Infisical's internal project management system.
Projects
None yet
Development

No branches or pull requests

4 participants