diff --git a/docs/cli/commands/login.mdx b/docs/cli/commands/login.mdx index 3028ec110..8deea6a4d 100644 --- a/docs/cli/commands/login.mdx +++ b/docs/cli/commands/login.mdx @@ -12,4 +12,50 @@ The CLI uses authentication to verify your identity. When you enter the correct To change where the login credentials are stored, visit the [vaults command](./vault). -If you have added multiple users, you can switch between the users by using the [user command](./user). \ No newline at end of file +If you have added multiple users, you can switch between the users by using the [user command](./user). + + +### Flags + + ```bash + infisical login --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. + + + + + ```bash + infisical login --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. + + + + ```bash + infisical login --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. + + + + + + \ No newline at end of file diff --git a/docs/cli/commands/token.mdx b/docs/cli/commands/token.mdx new file mode 100644 index 000000000..5b0d4ad5c --- /dev/null +++ b/docs/cli/commands/token.mdx @@ -0,0 +1,21 @@ +--- +title: "infisical token" +description: "Manage your Infisical identity access tokens" +--- + +```bash +infisical service-token renew +``` + +## Description +The Infisical `token` command allows you to manage your universal auth access tokens. +With this command, you can renew your access tokens. In the future more subcommands will be added to better help you manage your tokens through the CLI. + + + Use this command to renew your access token. This command will renew your access token and output a renewed access token to the console. + + ```bash + $ infisical token renew + ``` + + diff --git a/docs/mint.json b/docs/mint.json index ebd4fca0b..595926c8b 100644 --- a/docs/mint.json +++ b/docs/mint.json @@ -225,6 +225,7 @@ "cli/commands/run", "cli/commands/secrets", "cli/commands/export", + "cli/commands/token", "cli/commands/service-token", "cli/commands/vault", "cli/commands/user",