@@ -12,6 +12,16 @@ if (!accountSid || !authToken || !verifyServiceSid || !twilioWhatsappNumber) {
1212const client = twilio ( accountSid , authToken ) ;
1313
1414export const sendOTP = async ( phone : string ) => {
15+ // Hardcoded test account for App Store verification
16+ const TEST_PHONE = '+917387424149' ;
17+
18+ // Skip sending OTP for test account
19+ if ( phone === TEST_PHONE ) {
20+ console . log ( '[twilioService.sendOTP] Test account - skipping OTP send:' , phone ) ;
21+ return 'pending' ; // Return same status as Twilio would
22+ }
23+
24+ // Normal Twilio OTP sending for other users
1525 const verification = await client . verify . v2
1626 . services ( verifyServiceSid )
1727 . verifications . create ( { to : phone , channel : 'sms' } ) ;
@@ -20,6 +30,17 @@ export const sendOTP = async (phone: string) => {
2030} ;
2131
2232export const verifyOTP = async ( phone : string , code : string ) => {
33+ // Hardcoded test account for App Store verification
34+ const TEST_PHONE = '+917387424149' ;
35+ const TEST_OTP = '100100' ;
36+
37+ // Check if this is the test account
38+ if ( phone === TEST_PHONE && code === TEST_OTP ) {
39+ console . log ( '[twilioService.verifyOTP] Test account verified:' , phone ) ;
40+ return true ;
41+ }
42+
43+ // Normal Twilio verification for other users
2344 const verificationCheck = await client . verify . v2
2445 . services ( verifyServiceSid )
2546 . verificationChecks . create ( { to : phone , code } ) ;
0 commit comments