Failed to get SMS provider
I am trying to test SMS MFA using a local instance of supabase (v2.34.3). Below is my configuration
I'm able to enroll a SMS factor but am getting the following error when calling the challenge API
do i need to set a provider in my config.toml? if so—how can I do that? I've previously attempted the above configuration in combination with a dummy twilio provider configuration and was getting a AuthAPIError (500)
2 Replies
@inder sorry for the tag but I saw you were able to help in another thread regarding test_otp, i was wondering if you possibly have any insights here
Ya i joined this thread because I wanted to test this first. Will get back to you later.
Hey, you're right about supabase asking for a sms provider. But this can be overriden by using sms-hook
The downside is that your predefined otp won't work. It will be dynamic everytime.
You'll have to create a edge function locally and in this function you can log the otp which is recieved and use that for testing
Here is a sample function code. I hardcoded values as this was just for quick testing. You should pass secret via env. In the container logs, you'll see the otp
You can also send this otp in an email to mailpit which is already available with supabase locally, so that you don't have to switch back and forth between browser and terminal