|
Apply review fixes to API token auth system
Backend: - navi/auth/deps.py: replace 3 DB round-trips with single JOIN query for token resolution; update last_used_at still separate (best-effort) - navi/api/routes/api_tokens.py: replace asyncpg-specific "UPDATE 1" string check with RETURNING id fetchrow; increase token_prefix from 8 to 12 chars for better visual identification; add security notes - tests/unit/auth/test_api_tokens.py: update tests for JOIN query and RETURNING-based revoke Frontend: - webclient/src/components/settings/ShowTokenModal.vue: new modal that shows the plain token in a readonly field with copy button and explicit warning — replaces the transient toast notification - webclient/src/components/settings/ApiKeysPanel.vue: use ShowTokenModal - webclient/src/composables/useWebSocket.js: add security comment about localStorage XSS risk and query param log exposure Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com> |
|---|
|
|
| navi/api/routes/api_tokens.py |
|---|
| navi/auth/deps.py |
|---|
| tests/unit/auth/test_api_tokens.py |
|---|
| webclient/dist/assets/index-BLRp95NP.js 100644 → 0 |
|---|
|
Not supported
|
| webclient/dist/assets/index-CtFBUjo6.css 0 → 100644 |
|---|
| webclient/dist/assets/index-DqAFWU66.js 0 → 100644 |
|---|
|
Not supported
|
| webclient/dist/assets/index-Wyt5c1oU.css 100644 → 0 |
|---|
| webclient/dist/index.html |
|---|
| webclient/src/components/settings/ApiKeysPanel.vue |
|---|
| webclient/src/components/settings/ShowTokenModal.vue 0 → 100644 |
|---|
| webclient/src/composables/useWebSocket.js |
|---|