pediatric-ai-scribe-v3/public/js
Daniel f12bdb0fa4 Fix: revoked sessions now actually log the other device out
The server-side revoke was always working — it deletes user_sessions
rows, and middleware correctly returned 401 on the revoked device's
next /api/* request. The bug was entirely client-side: individual
fetch handlers swallowed the 401 (rendering "no sessions found" or
empty data) and nothing redirected to the login screen. So the
revoked device looked like it stayed signed in.

Added public/js/authFetch.js: a global fetch interceptor that
watches every /api/* response. On 401 from a non-auth endpoint
(i.e. not /login, /register, /logout, /me, etc.), it clears any
cached token/user state and reloads the page. The reload's boot
flow lands on /api/auth/me → 401 → login screen as usual.

Guarded against false positives: only triggers when the app believes
the user is currently logged in (AUTH_TOKEN set or main-app visible)
so a pre-login 401 doesn't accidentally flash the screen.

Loaded before auth.js in index.html.
2026-04-14 05:10:16 +02:00
..
admin.js Replace all browser dialogs with modern modal, add OIDC admin UI 2026-04-09 02:43:23 +02:00
adminMilestones.js Replace all browser dialogs with modern modal, add OIDC admin UI 2026-04-09 02:43:23 +02:00
app.js Security hardening: low-risk easy wins 2026-04-14 02:42:32 +02:00
audioBackup.js v6.1: Turnstile bot protection, LiteLLM provider, PPTX tables, audio backup fixes, docs 2026-04-04 22:56:24 +02:00
auth.js Hide Active Sessions for SSO-only users 2026-04-14 05:07:07 +02:00
authFetch.js Fix: revoked sessions now actually log the other device out 2026-04-14 05:10:16 +02:00
browserWhisper.js FIX: Browser Whisper - 100% self-hosted, zero CDN dependencies 2026-03-31 23:12:21 +00:00
calculators.js Growth/BMI results: percentiles to 2 decimal places 2026-04-14 03:37:40 +02:00
chartReview.js Add automatic ICD-10 and CPT billing code suggestions 2026-04-11 01:50:17 +02:00
correctionTracker.js v9: Major feature update — audio backup, SOAP save, Dragon memory, S3 docs, CI/CD, APK 2026-03-28 21:08:32 +00:00
documents.js Hybrid auth: cookie-only on web, Keychain Bearer on mobile 2026-04-14 04:11:55 +02:00
encounters.js v6.2: Session management, password change, audit logging, refine context, UI fixes 2026-04-08 20:27:45 +02:00
hospitalCourse.js Add automatic ICD-10 and CPT billing code suggestions 2026-04-11 01:50:17 +02:00
learningHub.js Security hardening: PHI encryption, argon2, DOMPurify, SRI 2026-04-14 02:49:38 +02:00
liveEncounter.js Native Android: biometric auth, foreground service bridge, mic fix 2026-04-11 03:42:23 +02:00
memories.js Replace all browser dialogs with modern modal, add OIDC admin UI 2026-04-09 02:43:23 +02:00
milestones.js v6.2: Session management, password change, audit logging, refine context, UI fixes 2026-04-08 20:27:45 +02:00
milestonesData.js v4: Fix milestones display + add OpenID auth + 100MB PDF support 2026-04-01 17:59:51 +00:00
nextcloud.js Fix WebDAV selection, pdf-parse, prompt(), CSP, security issues 1/2/4/5 2026-03-24 02:28:43 -04:00
pediatricScheduleData.js Add growth velocity, feeding guidance, BMI classification to well visits 2026-03-23 23:11:24 +01:00
secureStorage.js Add hardware-backed secure storage for mobile auth token 2026-04-14 02:33:32 +02:00
shadess.js Add automatic ICD-10 and CPT billing code suggestions 2026-04-11 01:50:17 +02:00
sickVisit.js Add automatic ICD-10 and CPT billing code suggestions 2026-04-11 01:50:17 +02:00
soap.js Add pause/stop buttons to SOAP note recording 2026-04-11 05:19:12 +02:00
speechRecognition.js Add Web Speech Recognition option for real-time streaming 2026-03-31 21:57:24 +00:00
transcriptionSettings.js Replace all browser dialogs with modern modal, add OIDC admin UI 2026-04-09 02:43:23 +02:00
voiceDictation.js Add automatic ICD-10 and CPT billing code suggestions 2026-04-11 01:50:17 +02:00
voicePreferences.js Fix TTS preview for 'Server default' voice option 2026-03-31 16:15:41 +00:00
wellVisit.js Fix vaccine/catchup tabs and serve Quill locally 2026-03-23 22:59:47 -04:00
whisperWorker.js FIX: Browser Whisper - 100% self-hosted, zero CDN dependencies 2026-03-31 23:12:21 +00:00
whisperWorkerV2.js v16: Make Browser Whisper CDN failure graceful with clear warnings 2026-03-31 16:18:46 +00:00