Summary
Auth flow has a race condition during WebSocket reconnection and uses an error-prone pattern.
Findings
Impact
Auth flow can fail intermittently. Promise rejections may go unhandled.
Suggested Fix
Replace new Promise(async ...) with proper async/await. Store subscription reference. Make timeout configurable.
Summary
Auth flow has a race condition during WebSocket reconnection and uses an error-prone pattern.
Findings
Impact
Auth flow can fail intermittently. Promise rejections may go unhandled.
Suggested Fix
Replace new Promise(async ...) with proper async/await. Store subscription reference. Make timeout configurable.