Feat/africas talking sms provider#2619
Open
ianSurii wants to merge 4 commits into
Open
Conversation
Add Africa's Talking as an SMS OTP provider for phone auth: - New AfricasTalkingProvider implementing the SmsProvider interface (SendMessage/VerifyOTP), with sandbox/production endpoint selection. - AfricasTalkingProviderConfiguration in conf, wired under SMS config with the GOTRUE_SMS_AT_* env prefix. - Register 'africas_talking' in the GetSmsProvider factory. - Unit tests covering validation, successful send, whatsapp rejection, and delivery failure.
Africa's Talking requires the header name to be exactly 'apiKey'. Go's http.Header.Set canonicalises to 'Apikey', causing 401s. Switch to req.Header["apiKey"] direct assignment to preserve casing. Also clears GOTRUE_SMS_AT_SENDER_ID for sandbox — the AT sandbox rejects custom sender IDs; leave empty to use the shared shortcode.
Add GOTRUE_SMS_AT_API_KEY, GOTRUE_SMS_AT_USERNAME, and GOTRUE_SMS_AT_SENDER_ID placeholders to example.env so operators know which env vars to set when using the africas_talking provider.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds Africa's Talking as a first-class SMS OTP provider, following the same pattern as the existing Vonage, Messagebird and Textlocal providers.
Motivation
Africa's Talking is the dominant SMS gateway across Kenya, Nigeria, Ghana, Tanzania, Uganda and Rwanda — regions where none of the currently supported providers offer affordable or reliable coverage. This is a gap that affects a significant portion of the African developer community building on Supabase.
Changes
internal/api/sms_provider/africas_talking.go— provider implementationinternal/conf/configuration.go—AfricasTalkingProviderConfigurationstruct +Validate()internal/api/sms_provider/sms_provider.go— factory case"africas_talking"example.env— env var placeholdersConfiguration
GOTRUE_SMS_PROVIDERafricas_talkingGOTRUE_SMS_AT_API_KEYGOTRUE_SMS_AT_USERNAMEsandboxfor testing)GOTRUE_SMS_AT_SENDER_IDTesting
Notes
I'm aware of the current policy on new SMS providers. Given the regional significance of Africa's Talking for African developers on Supabase, I'm submitting this in hopes it warrants an exception — or at minimum serves as a reference implementation once the generic provider path is ready.