I can't enroll 2fa with messagebird / bird
Aim:
Allow my app's users to enroll a MFA via phone/SMS.
Issue:
When the UI calls
Setup:
I am an admin of a MessageBird / Bird org. I added my Messagebird Access Key and Messagebird Originator (see attached screenshots), which were manually tested in the Messagebird dashboard to send a text message.
My debug attempt:
Code:
Response:
Allow my app's users to enroll a MFA via phone/SMS.
Issue:
When the UI calls
enroll, then the Supabase server responds with 200 HTTP status code, but that phone number never receives the OTP.Setup:
I am an admin of a MessageBird / Bird org. I added my Messagebird Access Key and Messagebird Originator (see attached screenshots), which were manually tested in the Messagebird dashboard to send a text message.
My debug attempt:
- Messagebird logs are empty.
- I added an incorrect Messagebird Access Key, and the server is still responding with 200 HTTP status code. But I expected it to throw an error.
Code:
- latest supabase-js version```tsxexport const useEnrollMfa = <Channel extends Setup2faChannel>({channel,}: {channel: Channel;}) => {return useMutation({ mutationKey: ["mfaEnroll", channel], mutationFn: async ({ phoneNumber }: { phoneNumber: string }) => { const factors = await supabase.auth.mfa.listFactors(); if (factors.error) { captureException("Failed to list MFA factors.", { level: "error", extra: { factorsError: factors.error }, }); throw factors.error; } const { data } = await supabase.auth.mfa.enroll({ factorType: "phone", phone: phoneNumber, // in E.164 format friendlyName: "smsA", }); return data; },});};```
Response:

