Usage
Description
Log in to Sentry using OAuth or an API token. The OAuth flow uses a device code - you’ll be given a code to enter at a URL. Alternatively, use--token to authenticate with an existing API token.
The command will:
- Check if you’re already authenticated (and skip if so)
- Start an OAuth device flow (default) or validate the provided token
- Fetch and cache your user information
- Save credentials to your local configuration file
If authentication is provided via environment variable (
SENTRY_AUTH_TOKEN or SENTRY_TOKEN), you’ll need to unset it to use OAuth-based login instead.Options
string
Authenticate using an API token instead of OAuth. The token will be validated by fetching user regions from the Sentry API.
number
default:"900"
Timeout for OAuth flow in seconds. The default is 900 seconds (15 minutes).
Examples
OAuth login (default)
Login with API token
OAuth with custom timeout
Related Commands
sentry auth logout- Log out and remove stored credentialssentry auth status- View authentication status and verify credentialssentry auth whoami- Show the currently authenticated user