Skip to content

feat: add bird_verify SMS OTP provider - #2685

Draft
cxbitz wants to merge 1 commit into
supabase:masterfrom
cxbitz:feat/bird-verify-provider
Draft

feat: add bird_verify SMS OTP provider#2685
cxbitz wants to merge 1 commit into
supabase:masterfrom
cxbitz:feat/bird-verify-provider

Conversation

@cxbitz

@cxbitz cxbitz commented Aug 7, 2026

Copy link
Copy Markdown

Adds bird_verify, which delivers phone OTPs through Bird Verify. Verify generates the passcode, delivers it, and checks it, so this is a verify-service provider like twilio_verify rather than a raw sender. It sends from Bird's managed sender pool, so it works on a brand-new account with nothing provisioned, and it covers both SMS and WhatsApp with the channel Auth asks for passed through per request.

It is separate from the existing messagebird provider because the models are incompatible: a plain sender delivers the code Auth generated and stored, while Verify generates its own, so one cannot be expressed as the other. That needs one additive change outside the new file. The verification paths reached the provider through a concrete *TwilioVerifyProvider type assertion, which no second verify-service provider can satisfy, so verify.go and reauthenticate.go now call VerifyOTP through the SmsProvider interface and the config checks become IsVerifyServiceProvider. IsTwilioVerifyProvider is left in place.

Bird Verify is a managed OTP service: it generates the passcode, delivers
it, and checks it, so Auth delegates verification instead of storing a
token. The provider follows twilio_verify, which works the same way. Both
the sms and whatsapp channels are supported, and the requested channel is
pinned per request so a request for SMS is not delivered over WhatsApp by
the workspace's configured channel order.

The verification endpoints were reached through concrete
*TwilioVerifyProvider type assertions, so verify.go and reauthenticate.go
now call VerifyOTP through the SmsProvider interface, and the
twilio_verify checks become IsVerifyServiceProvider.

Error responses carry a remediation string and a request id alongside the
code, so the error type surfaces them when present rather than mapping
codes locally, and implements error so callers can inspect it.

Configure with GOTRUE_SMS_PROVIDER=bird_verify and
GOTRUE_SMS_BIRD_VERIFY_API_KEY. The API host is derived from the key's
bk_{region}_ prefix; GOTRUE_SMS_BIRD_VERIFY_REGION and
GOTRUE_SMS_BIRD_VERIFY_API_URL override it.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant