You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
During KYC onboarding the user fills the country pickers (CountryField): nationality and residence / address country. Today these start empty — PR #519 deliberately removed the previous hardcoded "Switzerland" auto-select because it silently registered every user as a Swiss national/resident.
A better default than "empty" or "always CH" is the country the user is actually in: derive it from the request IP and pre-suggest it.
Proposal
Detect the user's current country via IP geolocation and pre-suggest it in the onboarding country pickers.
Data source. Prefer backend-provided detection (the API already sees the request IP) over shipping a third-party geo-IP dependency in the app — e.g. /v1/country or /v2/user could return a detected country. To be confirmed against the backend.
Nationality vs. residence. IP is a reasonable proxy for residence but a weak one for nationality. Consider applying the suggestion only to the residence/address field, or clearly marking the nationality suggestion as a guess.
Motivation
During KYC onboarding the user fills the country pickers (
CountryField): nationality and residence / address country. Today these start empty — PR #519 deliberately removed the previous hardcoded "Switzerland" auto-select because it silently registered every user as a Swiss national/resident.A better default than "empty" or "always CH" is the country the user is actually in: derive it from the request IP and pre-suggest it.
Proposal
Open questions / scope
/v1/countryor/v2/usercould return a detected country. To be confirmed against the backend.nationalityAllowed/locationAllowed, see fix(kyc): filter country pickers by allow-flag, harden load states #519). If the detected country is not allowed for that purpose, fall back to no pre-selection.Acceptance criteria
Related: #519