Phone authentication for your app
You can let users sign in with their phone number and a one-time code sent by text message. You must connect your own external SMS service account, as Lovable does not provide free or managed text messaging.
Creators building mobile-first or local service apps whose users prefer logging in with text messages instead of email and passwords.
Do this, in order
- 1
Create an account with a supported SMS service (Twilio, Twilio Verify, TextLocal, Vonage, or MessageBird) and find your account keys in their dashboard.
Phone sign-in requires an external SMS service to send text messages and bills you directly.
- 2
In your Lovable project, go to More, select Users, open Settings, and click Phone.
This is where you turn on phone authentication for apps using the built-in backend.
- 3
Turn on Enable phone sign-in, pick your active SMS service, and paste in your credentials.
Lovable needs these keys to route verification codes through your SMS account.
- 4
Configure your message template, code length, and expiration time between 60 and 600 seconds.
This customizes the text message sent to users and sets how long codes remain valid.
- 5
Paste the prompt into your Lovable chat to generate the phone number entry and code verification screens.
Lovable will build the necessary user interface and connect it to your authentication settings.
- 6
Test the flow using a real phone number to confirm the code arrives, accepts entry, and creates a user under More → Users.
Testing verifies that your credentials work and that SMS delivery succeeds in your target country.
Paste this into your project
Let users sign in with their phone number using an SMS code.
Words decoded
- SMS provider
- A paid external service like Twilio or Vonage that handles sending text messages to mobile phones.
- OTP
- A temporary code (one-time password) sent via text message that expires after a few minutes.
Where people get stuck
- Leaving 'Auto-confirm SMS' enabled in production, which bypasses code verification and lets anyone log in with any phone number without proving ownership.
- Expecting Lovable to send text messages for free; phone sign-in has no managed mode and requires your own funded SMS provider account.
- Setting the code expiration window too short, causing codes to expire before users can type them.
- Ignoring country-specific sender regulations, which can cause message delivery to fail in certain regions.
The short version, steps, decoder and prompt on this page are written automatically from Lovable's own documentation and can lag or misread it. The official page is always the authority.