Users and authentication
Lovable includes a built-in user system with login, signup, and account management ready out of the box. You can enable sign-in with email, phone, or providers like Google and Apple without doing any complex setup.
Anyone building an app that needs user accounts, protected screens, or login buttons.
Do this, in order
- 1
Ask Lovable in your project chat to add authentication and specify which pages should require login.
Lovable automatically generates the sign-up and login pages, connects the backend, and secures your user data.
- 2
Open More → Users to view your registered users, invite people by email, or manually create new accounts.
This dashboard lets you search, inspect, or delete user accounts as your app grows.
- 3
Go to More → Users → Settings to toggle sign-in methods like Google, Apple, phone, or email.
You can offer the exact login methods your audience expects without needing third-party developer accounts for standard options.
- 4
Check Advanced settings under More → Users → Settings to ensure your published domain is listed under Redirect URLs.
Missing redirect URLs can cause login to work in preview but break once your app is live.
Paste this into your project
Add user authentication to this app. Require users to log in before they can access the dashboard. Include email/password login as well as a 'Sign in with Google' button, and make sure new users can sign up directly.
Words decoded
- Redirect URL
- The exact web address where a user is sent back after successfully logging in with an external service like Google.
- Access token
- A short-lived digital pass stored on the user's device that proves to the backend who they are on every request.
- Refresh token
- A secret backup key that quietly asks for a new digital pass so the user stays signed in without typing their password again.
- Row level security
- A database safety rule that ensures users can only read or edit their own data, not everyone else's.
Where people get stuck
- Testing local copies with 'localhost' will fail; Lovable requires testing with IP addresses like http://127.0.0.1:5173/** in the redirect URLs instead.
- Deleting a user does not immediately log them out if their current access token has not expired yet; sensitive actions need an explicit session check.
- Remixing a project will not copy existing user accounts over to the new project.
- Manual user creation does not support bulk imports, password hashes, or pre-existing user IDs.
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.