Call to registerUser Failing with Undocumented Error

Hello,

Working code is suddenly not working - app id = 8149FCCE-07DA-F988-FFBB-6154872C9500. I’m calling UserService.registerUser using the JS SDK passing any phone number. It throws an error that contains the single word “Authenticate.” The POST fails with a 400 error. The only thing called before this call is a logout call just to make sure the cache is cleared out.

Any current problems that would explain this?

Thank you,
Kelly

Hi Kelly,

Could you please check if the error happens if you disable the beforeRegister event handler in Cloud Code?

Regards,
Mark

Hi Mark, now it fails with “Property ‘password’ is required”. I guess I never understood what that Twilio plugin does, I see now that it does register a beforeRegister handler. I don’t know how to proceed. Apparently, that plugin was important to the flow that sent a verification code when using phoneNumber identity.

So I’m probably screwed, it looks like we are stuck with them. We wrote Twilio out of our apps and closed our account because of they quit sending our messages dependably. Apparently, we didn’t consider that registration would be hosed without them.

Thank you

Mark, I went back through the support database and found that I had asked you about writing my own beforeRegister hook a long time ago. In your response, you mentioned that the code for the Twilio plugin was available – would you be so kind as to tell me how I can get it?

Also, if I send my own verification code via email, do you see any problems I’ll have when calling the registerUser call the second time?

Thank you,
Kelly

PS. For posterity, the error “Authenticate” is precisely the error that twilio returns whenever you call their api using an invalid or non-existent appid/auth-token.

Hi Kelly,

Here’s the source for the Twilio service:
login-with-twilio-master-src.zip (5.0 KB)

Regards,
Mark