# URL-Konfiguration für NinjaCross E-Mails ## 🚨 Problem: Reset-Password E-Mail funktioniert nicht **Deine Server-URL:** `ninja.reptilfpv.de:3000` ## 🔧 Mögliche Ursachen: ### 1. Supabase URL-Konfiguration Supabase muss wissen, wohin die Bestätigungslinks führen sollen. **Lösung:** 1. **Supabase Dashboard** → **Authentication** → **URL Configuration** 2. **Site URL** setzen auf: `https://ninja.reptilfpv.de:3000` 3. **Redirect URLs** hinzufügen: - `https://ninja.reptilfpv.de:3000/**` - `http://ninja.reptilfpv.de:3000/**` (falls HTTP verwendet wird) ### 2. HTTPS vs HTTP Problem E-Mail-Clients blockieren oft HTTP-Links in E-Mails. **Lösung:** - **HTTPS verwenden** für alle Links - **SSL-Zertifikat** für `ninja.reptilfpv.de:3000` einrichten - **Port 3000** in der URL kann problematisch sein ### 3. E-Mail-Client-Sicherheit Manche E-Mail-Clients blockieren Links mit Ports oder verdächtigen Domains. **Lösung:** - **Standard-Ports** verwenden (80 für HTTP, 443 für HTTPS) - **Subdomain** verwenden: `ninja.reptilfpv.de` ohne Port - **Reverse Proxy** einrichten (Nginx/Apache) ## 🚀 Empfohlene Lösungen: ### Option 1: HTTPS mit Standard-Port ``` https://ninja.reptilfpv.de ``` - **Port 443** (Standard HTTPS) - **SSL-Zertifikat** erforderlich - **Reverse Proxy** (Nginx) einrichten ### Option 2: Subdomain ohne Port ``` https://ninja.reptilfpv.de ``` - **Port 3000** intern weiterleiten - **Nginx** als Reverse Proxy - **SSL-Zertifikat** für Subdomain ### Option 3: Hauptdomain verwenden ``` https://reptilfpv.de/ninja ``` - **Hauptdomain** mit Pfad - **Bessere E-Mail-Client-Kompatibilität** - **Standard-Ports** verwenden ## 🔧 Nginx Reverse Proxy Setup: ### 1. Nginx-Konfiguration ```nginx server { listen 80; listen 443 ssl; server_name ninja.reptilfpv.de; ssl_certificate /path/to/certificate.crt; ssl_certificate_key /path/to/private.key; location / { proxy_pass http://localhost:3000; proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection 'upgrade'; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-Proto $scheme; proxy_cache_bypass $http_upgrade; } } ``` ### 2. SSL-Zertifikat ```bash # Let's Encrypt SSL-Zertifikat sudo certbot --nginx -d ninja.reptilfpv.de ``` ## 📧 E-Mail-Template-Optimierungen: ### 1. Absolute URLs verwenden ```html Reset Reset ``` ### 2. HTTPS erzwingen ```html Reset ``` ### 3. Fallback-URLs ```html Reset

Falls der Link nicht funktioniert: https://ninja.reptilfpv.de

``` ## 🧪 Testing: ### 1. E-Mail-Links testen ```bash # Test-URLs curl -I https://ninja.reptilfpv.de:3000 curl -I https://ninja.reptilfpv.de curl -I http://ninja.reptilfpv.de:3000 ``` ### 2. E-Mail-Client-Test - **Gmail** - Links in E-Mail testen - **Outlook** - Sicherheitswarnungen prüfen - **Apple Mail** - Link-Funktionalität testen ### 3. Supabase-Logs prüfen - **Authentication Logs** in Supabase Dashboard - **Fehler-Meldungen** analysieren - **Redirect-URLs** überprüfen ## 🎯 Sofortige Lösung: ### 1. Supabase konfigurieren ``` Site URL: https://ninja.reptilfpv.de:3000 Redirect URLs: - https://ninja.reptilfpv.de:3000/** - https://ninja.reptilfpv.de:3000/auth/callback ``` ### 2. Optimierte Templates verwenden - **`reset-password-optimized.html`** - Verbesserte Kompatibilität - **`reset-password-table.html`** - Tabellen-basiert für maximale Kompatibilität ### 3. HTTPS einrichten - **SSL-Zertifikat** für `ninja.reptilfpv.de:3000` - **Oder** Reverse Proxy mit Standard-Port ## 📞 Debugging: ### 1. E-Mail-Links prüfen - **Link in E-Mail** kopieren und in Browser testen - **URL-Struktur** analysieren - **Redirects** verfolgen ### 2. Supabase-Logs - **Authentication** → **Logs** in Supabase Dashboard - **Fehler-Meldungen** suchen - **URL-Parameter** prüfen ### 3. Browser-Entwicklertools - **Network-Tab** für Redirects - **Console** für JavaScript-Fehler - **Security-Tab** für HTTPS-Probleme --- **Empfehlung:** Verwende `reset-password-table.html` mit HTTPS und Standard-Port für beste Kompatibilität! 🚀