What happened?
The magic-link verification screen creates async resources inside an effect but does not fully clean them up:
BroadcastChannel
- redirect
setTimeout
This is a small but worthwhile hardening task.
Current behavior
In src/views/VerifyMagicLink.tsx:
- a
BroadcastChannel is created after successful verification
- a timeout is scheduled to redirect the user
- neither resource is explicitly cleaned up on unmount
Steps to Reproduce
Send a magic link, click the link to verify, not the broadcast is still mounted.
Expected Behavior
Acceptance criteria
- No unclosed
BroadcastChannel remains after component unmount
- Redirect timeout is cleared on unmount
- Success flow still posts the success message and redirects correctly
- Error and missing-token cases still behave correctly
Environment
No response
Logs / stack traces
What happened?
The magic-link verification screen creates async resources inside an effect but does not fully clean them up:
BroadcastChannelsetTimeoutThis is a small but worthwhile hardening task.
Current behavior
In
src/views/VerifyMagicLink.tsx:BroadcastChannelis created after successful verificationSteps to Reproduce
Send a magic link, click the link to verify, not the broadcast is still mounted.
Expected Behavior
Acceptance criteria
BroadcastChannelremains after component unmountEnvironment
No response
Logs / stack traces