fix: Telefonnummern normalisieren — keine Duplikat-User mehr - #12
Merged
Merged
Conversation
Nutzer gaben die Nummer mal mit, mal ohne die nationale 0 nach +49 ein (+490151… vs +49151…) -> zwei verschiedene E-Mail-Aliase -> doppelte Accounts. - src/lib/phone.ts: normalizePhoneDE() bringt alles auf E.164 (+49…) und entfernt die Trunk-0; isValidPhoneDE() als leichte Pruefung. - login-form: normalisiert vor dem Senden, validiert, + Hinweistext zum Format. - send-otp / verify-otp: normalisieren serverseitig (die eigentliche Garantie), bevor User/E-Mail-Alias/otp_requests gebildet werden. https://claude.ai/code/session_01G1v5ZGvnrS5hb6eX2hfxKb
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Deployt send-otp/verify-otp/send-push bei jedem Push auf main, der supabase/functions/** aendert (oder manuell via workflow_dispatch). Nutzt supabase/setup-cli + SUPABASE_ACCESS_TOKEN (Repo-Secret). Loest das wiederkehrende manuelle Deployen ab. https://claude.ai/code/session_01G1v5ZGvnrS5hb6eX2hfxKb
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Nutzer gaben die Nummer mal mit, mal ohne die nationale
0nach der Ländervorwahl ein (+49 0151…vs+49 151…). Da der Auth-User über einen E-Mail-Alias aus der Nummer gebildet wird, entstanden dadurch doppelte Accounts (z.B.49015129079150und4915129079150= dieselbe Person).Fix
src/lib/phone.ts—normalizePhoneDE()bringt die Nummer auf E.164 (+49…) und entfernt die Trunk-0nach+49;isValidPhoneDE()als leichte Prüfung.login-form— normalisiert vor dem Senden, validiert das Format und zeigt einen Hinweistext („Format: +49 151 12345678 — ohne die 0 nach der +49").send-otp/verify-otp— normalisieren serverseitig (die eigentliche Garantie gegen Duplikate), bevor User / E-Mail-Alias /otp_requestsgebildet werden.Deploy (nötig, da Server-Fix)
Bestehende Duplikate
Werden dadurch nicht automatisch bereinigt — die vorhandenen Doppel-Accounts müssen manuell zusammengeführt/gelöscht werden (siehe Chat-Anleitung mit Such-SQL).
Test plan
+49 0151 …und+49 151 …→ landet beim selben Accounthttps://claude.ai/code/session_01G1v5ZGvnrS5hb6eX2hfxKb
Generated by Claude Code