fix: align OTP auth with actual API response format #28
Loading…
Add table
Reference in a new issue
No description provided.
Delete branch "schwifty/fix-otp-auth"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
sendOTPwas sendingContactNumberbut the API expectsPhone— phone was always empty, causing invalid phone errorAPIResponseexpected{"Success": true, "Data": {...}}but auth endpoints return{"OK": true, "UUID": "..."}— decode always failed,successdefaulted tofalseverifyOTPwas sendingCodebut the API expectsOTPNow uses dedicated
OTPRawResponseandVerifyOTPRawResponsestructs that match the actual API format instead of the genericAPIResponsewrapper.Test plan
🤖 Generated with Claude Code
Three bugs found and fixed: 1. sendOTP was sending "ContactNumber" but API expects "Phone" 2. APIResponse expected {"Success":true,"Data":{}} but API returns {"OK":true,"UUID":"..."} 3. verifyOTP was sending "Code" but API expects "OTP" Now decodes the raw API format directly instead of going through the generic APIResponse wrapper (which doesn't match auth endpoints). Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>Pull request closed