Scrum4Me/app
Madhura68 3a90fa9d13 feat(ST-1007): add QR login button on /login with SSE listener
Voltooit de desktop-zijde van de QR-pairing-flow. Gebruiker klikt "Inloggen
via mobiel" naast het wachtwoord-formulier → krijgt een QR-code → telefoon
scant en bevestigt → desktop wordt automatisch ingelogd zonder dat er ooit
een wachtwoord is getypt op het publieke apparaat.

app/(auth)/login/qr-login-button.tsx (Client Component):
- Phase-state: idle | starting | showing | expired | claiming
- klik → POST /api/auth/pair/start (credentials:'same-origin' voor s4m_pair)
- QRCodeSVG met fragment-URL als value (level=M, 200px); aria-label
- EventSource('/api/auth/pair/stream/<id>', { withCredentials: true })
  vereist voor cookie-auth — standaard verstuurt EventSource geen credentials
- bij data.status === 'approved': es.close → POST /pair/claim → router.push('/dashboard')
- aftellende timer (mm:ss); bij 0s → 'expired' state met Vernieuwen-knop
- cleanup bij unmount: removeEventListener + close
- A11y: <details> sectie toont fragment-URL als kopieerbare tekst voor screenreaders en gebruikers zonder camera

app/(auth)/login/page.tsx: QrLoginButton onder het bestaande wachtwoord-form
met "of"-divider, achter de bestaande surface-container-low styling.

Dependency: qrcode.react ^4.2.0 (client-side SVG; geen extra round-trip;
mobileSecret blijft op desktop in JS-geheugen).

Quality gates: lint 0 errors, tsc clean, vitest 139/139, next build slaagt
(login-route static, m/pair en pair/* dynamic).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-27 23:21:10 +02:00
..
(app) fix(M10): bump pending-TTL to 5min + repair MD3 contrast on pair page 2026-04-27 23:15:02 +02:00
(auth) feat(ST-1007): add QR login button on /login with SSE listener 2026-04-27 23:21:10 +02:00
api fix(M10): bump pending-TTL to 5min + repair MD3 contrast on pair page 2026-04-27 23:15:02 +02:00
debug-env chore(debug): add /debug-env page to verify Vercel env-var presence 2026-04-27 10:37:46 +02:00
styles chore: documentatie naar docs/, iconen bijgewerkt, theme.css verplaatst 2026-04-24 22:51:42 +02:00
apple-icon.png chore: documentatie naar docs/, iconen bijgewerkt, theme.css verplaatst 2026-04-24 22:51:42 +02:00
favicon.ico chore: documentatie naar docs/, iconen bijgewerkt, theme.css verplaatst 2026-04-24 22:51:42 +02:00
globals.css chore: documentatie naar docs/, iconen bijgewerkt, theme.css verplaatst 2026-04-24 22:51:42 +02:00
icon.png chore: documentatie naar docs/, iconen bijgewerkt, theme.css verplaatst 2026-04-24 22:51:42 +02:00
layout.tsx Add analytics and documentation updates 2026-04-25 15:11:51 +02:00
page.tsx feat(landing): highlight realtime updates and beta/desktop-first notice 2026-04-27 20:29:51 +02:00