Fix SMS OTP Authentication - 25/05/2026 04:29 EDT

Job ID: 40467506

Budget: ₹12,500 – ₹37,500 INR

I already receive the OTP successfully through MSG91 and can confirm that the code entered is correct, yet the login flow halts right after verification—no session token ever comes back. This exact flow used to work when the OTP was generated in-app, so the break clearly appeared after switching to SMS.

From the traces I see, the culprit sits in the OTP verification API response handling. The endpoint should return a JSON object containing status and token, and I do get an error message on failure, so you will have access to stack traces and log lines to speed up diagnosis.

What I need is a clean fix that:

• Parses the JSON response correctly,
• Hands the token to the session-generation middleware, and
• Restores a smooth backend auth flow exactly as before the switch.

Once the patch is applied I’ll test by requesting an OTP, submitting it, and confirming that the user session is created and maintained across subsequent endpoints. Please be comfortable digging into MSG91 callback structures, token middleware, and any mis-mapped fields that may have crept in during the migration.