Skip to content

feat: dedicated CHANGE_PHONE KYC step for phone updates#3368

Draft
TaprootFreak wants to merge 1 commit intodevelopfrom
feat/change-phone-kyc-step
Draft

feat: dedicated CHANGE_PHONE KYC step for phone updates#3368
TaprootFreak wants to merge 1 commit intodevelopfrom
feat/change-phone-kyc-step

Conversation

@TaprootFreak
Copy link
Collaborator

Summary

  • Remove phone update from PUT /v2/user and add dedicated PUT /v2/user/phone endpoint
  • Introduce CHANGE_PHONE KYC step (completed immediately, prepared for SMS verification in Phase 2)
  • Reset phoneCallCheckDate, phoneCallIpCheckDate, and phoneCallIpCountryCheckDate on phone change (security fix)
  • Audit trail via KYC step result containing { phone, previousPhone }

Test plan

  • npm run build compiles without errors
  • PUT /v2/user with { phone: "..." } no longer updates the phone number
  • PUT /v2/user/phone with { phone: "+41..." } updates the phone and creates a CHANGE_PHONE KYC step in DB
  • Verify phoneCallCheckDate, phoneCallIpCheckDate, phoneCallIpCountryCheckDate are reset to null after phone change
  • Frontend edit button on account screen uses new endpoint

🤖 Generated with Claude Code

…NE KYC step

Move phone change logic from PUT /v2/user to a new PUT /v2/user/phone
endpoint backed by a CHANGE_PHONE KYC step. This creates an audit trail
for phone changes and resets phoneCallCheckDate, phoneCallIpCheckDate,
and phoneCallIpCountryCheckDate on every phone update (security fix).
The KYC step is immediately completed for now but structured so SMS
verification can be added later.
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