Skip to content

feat: Push-Notifications scharfschalten (echtes Web Push mit VAPID) - #11

Merged
Pascal-DCG merged 1 commit into
mainfrom
claude/push-notifications
Jul 11, 2026
Merged

feat: Push-Notifications scharfschalten (echtes Web Push mit VAPID)#11
Pascal-DCG merged 1 commit into
mainfrom
claude/push-notifications

Conversation

@Pascal-DCG

Copy link
Copy Markdown
Owner

Was

Die send-push-Edge-Function macht jetzt echtes Web Push. Die bisherige Version schickte nur ein rohes fetch an den Push-Endpoint — ohne VAPID-Signierung und ohne Payload-Verschlüsselung. Das lehnen alle Push-Dienste (FCM/Chrome, Mozilla, Apple) ab, es kam also nie eine Notification an.

Neu via npm:web-push@3.6.7:

  • webpush.setVapidDetails() aus den Env-Secrets
  • webpush.sendNotification() pro Subscription (VAPID-JWT + aes128gcm-Verschlüsselung)
  • Abgelaufene Subscriptions (404/410) werden automatisch gelöscht

Nötige Konfiguration (nicht im Code — Secrets/Env)

  • Supabase Secrets: VAPID_PUBLIC_KEY, VAPID_PRIVATE_KEY, VAPID_SUBJECT
  • Vercel Env: VITE_VAPID_PUBLIC_KEY (öffentlicher Schlüssel), danach Redeploy
  • Deploy: supabase functions deploy send-push (MCP-Deploy war in der Session blockiert)

Test plan

  • VAPID-Secrets in Supabase gesetzt, send-push deployed
  • VITE_VAPID_PUBLIC_KEY in Vercel gesetzt + Redeploy
  • App → Einstellungen → Push aktivieren (Browser-Erlaubnis erteilen)
  • Zweiter Nutzer erstellt einen passenden Gegen-Eintrag → Notification kommt an
  • Hinweis: iOS nur mit zum Homescreen hinzugefügter PWA

https://claude.ai/code/session_01G1v5ZGvnrS5hb6eX2hfxKb


Generated by Claude Code

Die bisherige send-push-Version schickte nur rohes fetch an den Endpoint —
ohne VAPID-Signierung und Payload-Verschluesselung, was Push-Dienste (FCM,
Mozilla, Apple) ablehnen. Jetzt via npm:web-push@3.6.7:
- webpush.setVapidDetails() aus VAPID_PUBLIC_KEY/PRIVATE_KEY/SUBJECT
- webpush.sendNotification() pro Subscription (VAPID + aes128gcm)
- 404/410 -> abgelaufene Subscription loeschen

Voraussetzung: VAPID-Secrets in Supabase + VITE_VAPID_PUBLIC_KEY in Vercel.

https://claude.ai/code/session_01G1v5ZGvnrS5hb6eX2hfxKb
@vercel

vercel Bot commented Jul 11, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
kommit Ready Ready Preview, Comment Jul 11, 2026 4:00pm

@Pascal-DCG
Pascal-DCG merged commit 60ff6c0 into main Jul 11, 2026
4 checks passed
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.

2 participants