Skip to main content
infisical login

Description

The CLI uses authentication to verify your identity. When you enter the correct email and password for your account, a token is generated and saved in your system Keyring to allow you to make future interactions with the CLI. To change where the login credentials are stored, visit the vaults command. If you have added multiple users, you can switch between the users by using the user command.

Flags

infisical login --method=<auth-method> # Optional, will default to 'user'.

Valid values for the method flag are:

  • user: Login using email and password.
  • universal-auth: Login using a universal auth client ID and client secret.
When method is set to universal-auth, the client-id and client-secret flags are required. Optionally you can set the INFISICAL_UNIVERSAL_AUTH_CLIENT_ID and INFISICAL_UNIVERSAL_AUTH_CLIENT_SECRET environment variables instead of using the flags.When you authenticate with universal auth, an access token will be printed to the console upon successful login. This token can be used to authenticate with the Infisical API and the CLI by passing it in the --token flag when applicable.Use flag --plain along with --silent to print only the token in plain text when using the universal-auth method.
infisical login --client-id=<client-id> # Optional, required if --method=universal-auth.

Description

The client ID of the universal auth client. This is required if the --method flag is set to universal-auth.
The client-id flag can be substituted with the INFISICAL_UNIVERSAL_AUTH_CLIENT_ID environment variable.
infisical login --client-secret=<client-secret> # Optional, required if --method=universal-auth.

Description

The client secret of the universal auth client. This is required if the --method flag is set to universal-auth.
The client-secret flag can be substituted with the INFISICAL_UNIVERSAL_AUTH_CLIENT_SECRET environment variable.