Make auth JWT-only for Capacitor WebView origins (#22) (#26)
Unit Tests / test (push) Successful in 10s
Unit Tests / test (push) Successful in 10s
## Summary - Closes #22 - Drop CSRF cookie / `js-cookie` path; axios uses JWT `Authorization` only (`withCredentials: false`) - Unified token storage: `localStorage` sync source of truth + optional Capacitor Preferences mirror/hydrate for native shells - Request interceptor always attaches fresh bearer token; 401 refresh + sign-in redirect use hash-safe native paths - Companion backend PR: `ai_ml_operations/chat_backend` branch `capacitor-cors-csrf-22` (CORS/CSRF Capacitor origins) ## Test plan - [x] Unit tests: `tokenStorage`, `nativePlatform`, `jwtHelpers`, Auth/SignIn/WebSocket (`npm run test:ci`) - [ ] Login from Capacitor Android (`https://localhost`) and iOS (`capacitor://localhost`) - [ ] Token refresh after access expiry; logout blacklist; password reset; 401 → sign-in - [ ] Confirm browser build at `chat.aimloperations.com` unchanged - [ ] Merge companion backend PR so prod CORS includes Capacitor origins when `CORS_ORIGIN_ALLOW_ALL=false`Reviewed-on: #26
This commit was merged in pull request #26.
This commit is contained in:
@@ -18,7 +18,6 @@
|
||||
"bootstrap": "^5.3.3",
|
||||
"chroma-js": "^3.1.2",
|
||||
"formik": "^2.4.6",
|
||||
"js-cookie": "^3.0.5",
|
||||
"jwt-decode": "^4.0.0",
|
||||
"lodash": "^4.17.21",
|
||||
"markdown-to-jsx": "^7.7.2",
|
||||
|
||||
Reference in New Issue
Block a user