Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: do call send sms hook when SMS autoconfirm is enabled (supabase#…
…1562) ## What kind of change does this PR introduce? Small quirk discovered while testing - it currently looks like when SMS Autoconfirm is set ``` GOTRUE_SMS_AUTOCONFIRM="true" ``` and an OTP request is made: ``` curl -X POST http://localhost:9999/otp -H "Content-Type: application/json" -d '{"phone": "<phone>"}' ``` an OTP is still sent. There's a substantial number projects (see internal for exact number) using this so probably will preserve this behaviour. This affects the edge case where `SMS_AUTOCONFIRM` is enabled but the Hook returns an error which may leave the developer puzzled since one might expect an SMS not to be sent with autoconfirm similar to `MAILER_AUTOCONFIRM` Before: - Enable Send SMS and autoconfirm, make a request with faulty URI - request should fail After: - Enable Send SMS and autoconfirm, make a request - message is sent as per current behaviour --------- Co-authored-by: Kang Ming <kang.ming1996@gmail.com>
- Loading branch information