Skip to main content

Documentation Index

Fetch the complete documentation index at: https://porter-mintlify-4369f078.mintlify.app/llms.txt

Use this file to discover all available pages before exploring further.

porter auth contains commands for authenticating with Porter.

porter auth login

Authenticate with your Porter account. By default, this opens your browser to complete authentication. Usage:
porter auth login [flags]
Options:
FlagDescription
--tokenLog in using an existing token
porter auth login
After logging in, Porter automatically sets your default project and cluster if you have access to any. You can view these with porter config.

Login methods

porter auth login supports two browser-based flows. Switch between them with porter config set-login-method.
MethodCredential stored locallyToken lifetime
v1 (default)Long-lived Porter JWTDoes not expire
v2Short-lived WorkOS access token issued via PKCERefreshed automatically; expires after a short window
The v2 flow signs in through your Porter SSO identity provider and authenticates subsequent API requests with a short-lived access token. Use it when your organization requires session-bound credentials on developer machines. The v1 flow remains the default and is recommended for CI/CD and other automated environments that need a stable long-lived token.
Both flows use the same porter auth login command — only the credential stored in ~/.porter/config.json and sent on each request differs. No changes are required to existing scripts when staying on v1.

porter auth logout

Log out from Porter and clear your local credentials. Usage:
porter auth logout
After logging out, you’ll need to run porter auth login again before using other commands.