Skip to content

The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.

Guide to Setting Up TextLocal as Your Phone Login Provider (#21499)

Madhav Bansal70c118df900e
diff --git a/apps/docs/components/Navigation/NavigationMenu/NavigationMenu.constants.ts b/apps/docs/components/Navigation/NavigationMenu/NavigationMenu.constants.ts
index 3f3f3cf9754..8fca482d4a6 100644
--- a/apps/docs/components/Navigation/NavigationMenu/NavigationMenu.constants.ts
+++ b/apps/docs/components/Navigation/NavigationMenu/NavigationMenu.constants.ts
@@ -492,6 +492,12 @@ export const PhoneLoginsItems = [
isDarkMode: true,
hasLightIcon: true,
},
+ {
+ name: 'Textlocal SMS Login (Community Supported)',
+ icon: '/docs/img/icons/textlocal-icon',
+ url: '/guides/auth/phone-login/textlocal',
+ linkDescription: 'Textlocal is a cloud-based SMS platform offering bulk messaging services.',
+ },
]
export const auth = {
diff --git a/apps/docs/content/guides/auth/phone-login/textlocal.mdx b/apps/docs/content/guides/auth/phone-login/textlocal.mdx
new file mode 100644
index 00000000000..9a717bfca17
--- /dev/null
+++ b/apps/docs/content/guides/auth/phone-login/textlocal.mdx
@@ -0,0 +1,63 @@
+---
+id: 'auth-textlocal'
+title: 'Phone Auth with Textlocal'
+subtitle: 'How to set up and use Mobile OTP with Textlocal and Supabase.'
+description: 'How to set up and use Mobile OTP with Textlocal and Supabase.'
+---
+
+<Admonition type="tip">
+
+To manage costs related to SMS authentication, consider setting project rate limits and configuring CAPTCHA. For additional cost-control strategies, visit the Production Checklist.
+
+Also check country-specific regulations around sending SMS messages, for example, India's TRAI DLT
+regulations.
+
+</Admonition>
+
+## Prerequisites
+
+Before you begin, ensure you have the following:
+
+- **A Textlocal account**: Sign up for [TextLocal](https://www.textlocal.com/signup) to start sending SMS messages.
+- **A Supabase project**: Necessary for SMS authentication integration. Create your project in the [Supabase Dashboard](https://supabase.com/dashboard).
+- **A mobile phone**: To receive SMS messages and test your setup.
+
+## Setting up Textlocal as your SMS provider
+
+To integrate Textlocal with Supabase:
+
+1. [Get a Textlocal API key](#get-a-textlocal-api-key)
+2. [Customize your sender name](#customize-your-sender-name-optional)
+3. [Configure your Supabase project](#configure-supabase)
+
+### Get a Textlocal API key
+
+1. Log into your Textlocal account and go to `Settings` > `API Keys`.
+2. Generate a new API Key. Save your new API key in a safe location.
+
+### Customize your sender name (Optional)
+
+Textlocal defaults to `TXTLCL` as the sender name for all messages. You can customize this to better reflect your brand:
+
+1. In your Textlocal dashboard, go to `Settings` > `All Settings` > `Sender Names`.
+2. Change your sender name.
+
+### Configure Supabase
+
+To set up Textlocal as your SMS provider in Supabase, follow these steps:
+
+1. In your Supabase Dashboard, go to the [Auth Providers section](https://supabase.com/dashboard/project/_/auth/providers).
+2. From the list of available authentication providers, select `Phone`.
+3. Toggle `Enable Phone Provider`.
+4. Under `SMS Provider`, select `Textlocal.`
+5. Enter your Textlocal API Key and Sender Name.
+6. Customize your SMS Message (optional).
+
+## Next steps
+
+To implement Phone Login, see the docs on [using Phone Login](/docs/guides/auth/phone-login#using-phone-login).
+
+## Resources
+
+- [Textlocal Signup](https://www.textlocal.com/sign-up)
+- [Supabase Dashboard](https://supabase.com/dashboard)
diff --git a/apps/docs/public/img/icons/textlocal-icon.svg b/apps/docs/public/img/icons/textlocal-icon.svg
new file mode 100644
index 00000000000..6a15d728bd3
--- /dev/null
+++ b/apps/docs/public/img/icons/textlocal-icon.svg
@@ -0,0 +1,22 @@
+<svg xmlns="http://www.w3.org/2000/svg" width="128" height="102" viewBox="0 0 128 102">
+ <script xmlns="" />
+ <script xmlns="" id="argent-x-extension" data-extension-id="dlcobpjiigpikoobohmabehhmhfoodbb" />
+ <g fill="none">
+ <path fill="#FFF"
+ d="M127.7,46.6 C127.7,17.4 101.3,1.3 61.4,6.8 C1.2,15 -1.9,5.7 7.2,50.6 C10.9,68.8 17.7,86.5 31.3,95.1 C29.7,97.5 27,100.6 23.7,100.6 C23.7,100.6 33.4,100.6 39.5,98.9 C45.7,100.8 53,101.2 61.7,99.5 C97.5,92.5 127.7,75.8 127.7,46.6"
+ opacity=".5" />
+ <path fill="#06038D"
+ d="M114.3,35.6 C113.1,10 99.9,-9.6 67.5,5 C34.7,19.9 -5.8,29.4 0.7,55.4 C7.2,81.5 54,99.3 89.3,92.4 C94.3,91.4 98.7,90.4 102.4,89.3 C106.5,93.8 114.5,101.8 118.9,101.9 C119,101.9 119.1,101.9 119.2,101.9 C119.1,101.8 113,92.3 111.2,86 C136,74.9 115.3,57.9 114.3,35.6 Z" />
+ <path fill="#00A3E0"
+ d="M127.7,46.6 C127.7,17.4 101.3,1.3 61.4,6.8 C1.2,15 -1.9,5.7 7.2,50.6 C10.9,68.8 17.7,86.5 31.3,95.1 C29.7,97.5 27,100.6 23.7,100.6 C23.7,100.6 33.4,100.6 39.5,98.9 C45.7,100.8 53,101.2 61.7,99.5 C97.5,92.5 127.7,75.8 127.7,46.6"
+ opacity=".5" />
+ <g fill="#FFF" transform="translate(28 52)">
+ <path
+ d="M.1 22.9L.1 1.5C.1 1.2.2.9.4.8.6.6.8.5 1.1.5L4.7.5C5 .5 5.3.6 5.4.8 5.6 1 5.7 1.2 5.7 1.5L5.7 22.9C5.7 23.2 5.6 23.5 5.4 23.6 5.2 23.8 5 23.9 4.7 23.9L1.1 23.9C.8 23.9.5 23.8.4 23.6.2 23.5.1 23.2.1 22.9zM11.2 21.9C9.5 20.3 8.7 18 8.7 15 8.7 12 9.5 9.6 11.2 8.1 12.9 6.5 15.3 5.7 18.5 5.7 21.7 5.7 24.1 6.5 25.8 8.1 27.5 9.7 28.3 12 28.3 15 28.3 18 27.5 20.4 25.8 21.9 24.1 23.5 21.7 24.3 18.5 24.3 15.3 24.3 13 23.4 11.2 21.9zM15.4 10.7C14.7 11.6 14.4 13 14.4 14.9 14.4 16.9 14.7 18.3 15.4 19.2 16.1 20.1 17.1 20.5 18.6 20.5 20.1 20.5 21.1 20.1 21.8 19.2 22.5 18.3 22.8 16.9 22.8 14.9 22.8 12.9 22.5 11.5 21.8 10.7 21.1 9.8 20.1 9.4 18.6 9.4 17.1 9.4 16.1 9.8 15.4 10.7zM30.4 15C30.4 11.9 31.2 9.6 32.9 8.1 34.6 6.5 37 5.7 40.1 5.7 43 5.7 45.3 6.2 46.9 7.2 48.5 8.2 49.3 9.6 49.3 11.5 49.3 11.8 49.2 12.1 49 12.2 48.8 12.4 48.6 12.5 48.3 12.5L45.8 12.5C45.1 12.5 44.4 12.1 43.9 11.3 43.2 10.3 42.1 9.8 40.4 9.8 38.8 9.8 37.7 10.2 37 11 36.3 11.8 36 13.2 36 15.1 36 16.9 36.3 18.3 37 19.1 37.7 19.9 38.8 20.3 40.5 20.3 42.2 20.3 43.4 19.8 44 18.8 44.5 18 45.2 17.6 45.9 17.6L48.4 17.6C48.7 17.6 49 17.7 49.1 17.9 49.3 18.1 49.4 18.3 49.4 18.6 49.4 20.4 48.6 21.9 47 22.9 45.4 23.9 43.1 24.4 40.2 24.4 37 24.4 34.6 23.6 32.9 22 31.2 20.3 30.4 18 30.4 15zM53.3 22.7C51.8 21.7 51.1 20.3 51.1 18.4 51.1 16.6 51.8 15.2 53.3 14.2 54.8 13.2 56.6 12.7 58.8 12.7L64.2 12.7C64.2 11.4 63.9 10.5 63.4 10.1 62.8 9.6 62 9.4 60.9 9.4 59.4 9.4 58.3 9.8 57.7 10.5 57.3 11.1 56.6 11.3 55.9 11.3L53.5 11.3C53.2 11.3 52.9 11.2 52.8 11 52.6 10.8 52.5 10.6 52.5 10.3 52.5 7.2 55.5 5.6 61.4 5.6 64 5.6 66 6.2 67.6 7.3 69.2 8.4 70 10.3 70 12.7L70 22.8C70 23.1 69.9 23.4 69.7 23.5 69.5 23.7 69.3 23.8 69 23.8L65.9 23.8C65.6 23.8 65.3 23.7 65.2 23.5 65 23.3 64.9 23.1 64.9 22.8L64.9 22.3C63.2 23.5 61.2 24.1 59 24.1 56.6 24.2 54.7 23.7 53.3 22.7zM56.8 18.5C56.8 19.1 57 19.6 57.5 20 57.9 20.4 58.6 20.6 59.5 20.6 61.2 20.6 62.8 20.1 64.4 19.1L64.4 16.6 59.4 16.6C58.6 16.6 58.1 16.8 57.6 17.2 57 17.4 56.8 17.9 56.8 18.5zM73.9 22.9L73.9 1.5C73.9 1.2 74 .9 74.2.8 74.4.6 74.6.5 74.9.5L78.5.5C78.8.5 79.1.6 79.2.8 79.4 1 79.5 1.2 79.5 1.5L79.5 22.9C79.5 23.2 79.4 23.5 79.2 23.6 79 23.8 78.8 23.9 78.5 23.9L74.9 23.9C74.6 23.9 74.3 23.8 74.2 23.6 74 23.4 73.9 23.2 73.9 22.9z" />
+ </g>
+ <g fill="#FFF" transform="translate(34 21)">
+ <path
+ d="M.5 17.1L.5 1.8C.5 1.5.6 1.2.8 1.1 1 .9 1.2.8 1.5.8L5.1.8C5.4.8 5.7.9 5.8 1.1 6 1.3 6.1 1.5 6.1 1.8L6.1 7.2 10.6 7.2C10.9 7.2 11.2 7.3 11.3 7.5 11.4 7.7 11.6 7.9 11.6 8.2L11.6 10.2C11.6 10.5 11.5 10.8 11.3 10.9 11.1 11.1 10.9 11.2 10.6 11.2L6.1 11.2 6.1 17.2C6.1 18.3 6.4 19.2 6.9 19.8 7.4 20.4 8.1 20.7 9 20.7 9.3 20.7 9.7 20.6 10.2 20.6 10.7 20.5 11 20.5 11.3 20.5L11.9 20.5C12.2 20.5 12.5 20.6 12.6 20.8 12.8 21 12.9 21.2 12.9 21.5L12.9 23.2C12.9 23.4 12.8 23.6 12.6 23.8 12.4 24 12.2 24.1 11.9 24.1 10.8 24.3 9.3 24.4 7.6 24.4 2.9 24.5.5 22.1.5 17.1zM16.8 22.1C15.1 20.5 14.3 18.2 14.3 15.3 14.3 12.4 15.1 10 16.8 8.4 18.5 6.8 20.8 6 23.8 6 26.8 6 29.1 6.8 30.8 8.4 32.5 10 33.3 12.3 33.3 15.3L33.3 16.3C33.3 16.6 33.2 16.9 33 17 32.8 17.2 32.6 17.3 32.3 17.3L20 17.3C20.1 18.5 20.5 19.4 21.2 20 21.9 20.6 22.9 20.8 24.2 20.8 25.7 20.8 26.8 20.4 27.4 19.7 27.8 19.1 28.5 18.8 29.2 18.8L31.6 18.8C31.9 18.8 32.2 18.9 32.3 19.1 32.5 19.3 32.6 19.5 32.6 19.9 32.6 23 29.6 24.5 23.7 24.5 20.7 24.5 18.5 23.7 16.8 22.1zM20 13.5L27.6 13.5C27.5 10.9 26.3 9.6 23.9 9.6 21.4 9.7 20.1 11 20 13.5zM34.2 23.7C34.1 23.6 34.1 23.5 34.1 23.4 34.1 23.2 34.2 23 34.4 22.7L40.1 15.2 34.8 7.7C34.6 7.5 34.6 7.3 34.5 7 34.4 6.7 34.6 6.6 34.7 6.4 34.8 6.2 35 6.2 35.3 6.2L38.8 6.2C39.9 6.2 40.7 6.7 41.3 7.7L44 11.8 46.7 7.7C47.3 6.7 48.2 6.2 49.2 6.2L52.7 6.2C52.9 6.2 53.1 6.3 53.3 6.4 53.4 6.6 53.5 6.7 53.5 7 53.5 7.3 53.4 7.4 53.2 7.7L47.9 15.2 53.6 22.7C53.8 22.9 53.9 23.1 53.9 23.4 53.9 23.5 53.9 23.6 53.8 23.7 53.7 24 53.5 24.2 53.1 24.2L49.6 24.2C48.6 24.2 47.8 23.7 47.1 22.7L44 18.4 40.9 22.7C40.2 23.7 39.4 24.2 38.4 24.2L34.9 24.2C34.5 24.2 34.3 24 34.2 23.7zM56.2 17.1L56.2 1.8C56.2 1.5 56.3 1.2 56.5 1.1 56.7.9 56.9.8 57.2.8L60.8.8C61.1.8 61.4.9 61.5 1.1 61.7 1.3 61.8 1.5 61.8 1.8L61.8 7.2 66.3 7.2C66.6 7.2 66.9 7.3 67 7.5 67.2 7.7 67.3 7.9 67.3 8.2L67.3 10.2C67.3 10.5 67.2 10.8 67 10.9 66.8 11.1 66.6 11.2 66.3 11.2L61.8 11.2 61.8 17.2C61.8 18.3 62.1 19.2 62.6 19.8 63.1 20.4 63.8 20.7 64.7 20.7 65 20.7 65.4 20.6 65.9 20.6 66.4 20.5 66.7 20.5 67 20.5L67.6 20.5C67.9 20.5 68.2 20.6 68.3 20.8 68.5 21 68.6 21.2 68.6 21.5L68.6 23.2C68.6 23.4 68.5 23.6 68.3 23.8 68.1 24 67.9 24.1 67.6 24.1 66.5 24.3 65 24.4 63.3 24.4 58.5 24.5 56.2 22.1 56.2 17.1z" />
+ </g>
+ </g>
+</svg>
\ No newline at end of file