You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
docs: remove DB schema details and direct access examples
Users should use `sentry auth token` and `sentry auth status` instead
of querying the database directly. Remove the auth table schema,
sqlite3 examples, and direct database access encouragement.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Copy file name to clipboardExpand all lines: docs/src/content/docs/commands/auth.md
+3-27Lines changed: 3 additions & 27 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -86,40 +86,16 @@ This is typically handled automatically when tokens expire.
86
86
87
87
## Credential Storage
88
88
89
-
We store credentials in a SQLite database at `~/.sentry/cli.db` with restricted file permissions (mode 600). The database uses a single-row `auth` table with the following columns:
89
+
Credentials are stored in a SQLite database at `~/.sentry/cli.db` with restricted file permissions (mode 600).
90
90
91
-
| Column | Type | Description |
92
-
|--------|------|-------------|
93
-
|`token`| TEXT | OAuth access token |
94
-
|`refresh_token`| TEXT | OAuth refresh token |
95
-
|`expires_at`| INTEGER | Token expiry (ms since epoch) |
96
-
|`issued_at`| INTEGER | Token issue time (ms since epoch) |
97
-
|`updated_at`| INTEGER | Last modification time (ms since epoch) |
91
+
Use `sentry auth token` to retrieve your current access token, or `sentry auth status` to check authentication state.
98
92
99
93
### Environment Variable Precedence
100
94
101
95
The CLI checks for auth tokens in the following order, using the first one found:
102
96
103
97
1.`SENTRY_AUTH_TOKEN` environment variable
104
98
2.`SENTRY_TOKEN` environment variable (legacy)
105
-
3. The `auth` table in the SQLite database
99
+
3. The stored token in the SQLite database
106
100
107
101
When a token comes from an environment variable, the CLI skips expiry checks and automatic refresh.
108
-
109
-
### Direct Database Access
110
-
111
-
If you need to inspect your stored credentials or integrate the CLI's auth with other tools, you can query the database directly. The config directory defaults to `~/.sentry/` but can be overridden with the `SENTRY_CONFIG_DIR` environment variable.
112
-
113
-
```bash
114
-
# Read the current access token
115
-
sqlite3 ~/.sentry/cli.db "SELECT token FROM auth WHERE id = 1;"
116
-
117
-
# Check token expiry
118
-
sqlite3 ~/.sentry/cli.db "SELECT datetime(expires_at / 1000, 'unixepoch') FROM auth WHERE id = 1;"
119
-
```
120
-
121
-
Keep in mind a few caveats when accessing the database from outside the CLI:
122
-
123
-
-**Token expiry** — Check `expires_at` before using the token. The CLI automatically refreshes expired tokens, but reading the database directly will not trigger a refresh.
124
-
-**WAL mode** — The database uses SQLite WAL (Write-Ahead Logging). Open it in read-only mode to avoid lock contention with a running CLI process.
125
-
-**Env var precedence** — If `SENTRY_AUTH_TOKEN` or `SENTRY_TOKEN` is set, the CLI ignores the database value. Follow the same precedence in external tools.
Copy file name to clipboardExpand all lines: docs/src/content/docs/configuration.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -145,4 +145,4 @@ We store credentials and caches in a SQLite database (`cli.db`) inside the confi
145
145
- Region URL mappings
146
146
- Project aliases (for monorepo support)
147
147
148
-
Other tools can query the database directly to inspect stored credentials and cached data. See [Credential Storage](./commands/auth/#credential-storage) in the auth command docs for the full schema and access details.
148
+
See [Credential Storage](./commands/auth/#credential-storage) in the auth command docs for more details.
0 commit comments