Skip to content

refactor(notifications): migrate ws auth to first-message pattern, ad…#42

Merged
aquie00t merged 1 commit intomainfrom
refactor/ws-auth-first-message
May 7, 2026
Merged

refactor(notifications): migrate ws auth to first-message pattern, ad…#42
aquie00t merged 1 commit intomainfrom
refactor/ws-auth-first-message

Conversation

@aquie00t
Copy link
Copy Markdown
Contributor

@aquie00t aquie00t commented May 7, 2026

…d max retries with toast

  • Remove token from WebSocket URL query param (security: token no longer logged in browser console or server access logs)
  • Send { event: 'auth', token } as first message on ws.onopen
  • Add MAX_RETRIES = 5 to stop infinite reconnect loop
  • Show info toast after max retries are exhausted

Relates to: the-developer-network/tdn-api#121

Summary

Type of change

  • Bug fix
  • New feature
  • Refactor / cleanup
  • Dependency update
  • Documentation

How was this tested?

Screenshots (if applicable)

Checklist

  • pnpm lint passes
  • pnpm exec tsc -b passes (no type errors)
  • Tested on mobile viewport (or N/A)
  • No new any types introduced
  • No console.log left in code
  • SEO / OG meta not regressed (if UI change)

@cloudflare-workers-and-pages
Copy link
Copy Markdown
Contributor

cloudflare-workers-and-pages Bot commented May 7, 2026

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Preview URL Updated (UTC)
✅ Deployment successful!
View logs
tdn-client e32e064 Commit Preview URL

Branch Preview URL
May 07 2026, 04:06 PM

@aquie00t aquie00t force-pushed the refactor/ws-auth-first-message branch 4 times, most recently from 6d277d5 to 151f5df Compare May 7, 2026 15:57
…d max retries with toast

- Remove token from WebSocket URL query param (security: token no longer
  logged in browser console or server access logs)
- Send { event: 'auth', token } as first message on ws.onopen
- Add MAX_RETRIES = 5 to stop infinite reconnect loop
- Show info toast after max retries are exhausted

Relates to: the-developer-network/tdn-api#121
@aquie00t aquie00t force-pushed the refactor/ws-auth-first-message branch from 151f5df to e32e064 Compare May 7, 2026 16:05
@aquie00t aquie00t merged commit 156d6a9 into main May 7, 2026
6 checks passed
@aquie00t aquie00t deleted the refactor/ws-auth-first-message branch May 7, 2026 16:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant