Login overview
Auth Login Command
Stores OAuth client credentials securely for subsequent CLI operations. Supports CLI flags, environment variables, and interactive prompts.
Added in v0.0.3
Table of contents
utils
login
Auth login command.
Stores OAuth client credentials securely in the system keychain (or encrypted file as fallback). Credentials are used for all subsequent CLI operations.
Usage:
# Direct entry with all flags
p1-cli auth login --client-id=abc --client-secret=xyz --environment-id=env-123 --region=com
# Using environment variables
export PINGONE_CLIENT_ID=abc
export PINGONE_CLIENT_SECRET=xyz
export PINGONE_ENV_ID=env-123
export PINGONE_AUTH_REGION=eu # Optional, defaults to "com"
p1-cli auth login
# Interactive prompts (CLI will prompt for missing values)
p1-cli auth login
# Mix of flags, env vars, and prompts
export PINGONE_CLIENT_ID=abc
export PINGONE_AUTH_REGION=asia
p1-cli auth login --client-secret=xyz
# Will prompt for environment-id, use asia region from env var
Signature
export declare const login: Command.Command<
"login",
OAuthService | Prompt.Prompt.Environment,
QuitException | OAuthFlowError,
{
readonly clientId: Option.Option<string>
readonly clientSecret: Option.Option<Redacted.Redacted<string>>
readonly environmentId: Option.Option<string>
readonly region: Option.Option<"com" | "eu" | "asia" | "ca">
}
>
Added in v0.0.3