Move Lovable auth to your own Supabase project

When the backend leaves Lovable Cloud, your users come with it. The export holds the user accounts with their password hashes, so users keep their passwords. They only have to sign in again. The login settings do not come with the export. You set them again.

Your users move. Their passwords too.

What moves and what you set again

PartIn the Lovable exportWhat you do
User accountsYes, with password hashesNothing. They move with the database
Sign-in providersNoTurn on the same ones in Supabase
Site URL and redirect URLsNoSet them again in Supabase
Google or GitHub loginNoChange the redirect URL at the provider

1. Restore the export

The accounts are part of the database export. Export the data from Lovable Cloud and restore it into your new Supabase project. Move Lovable Cloud to your own Supabase project has every step.

2. Turn on the same sign-in providers

In Supabase go to Authentication and turn on the same sign-in providers as in Lovable Cloud.

The Supabase Sign In and Providers page with the Email provider enabled

3. Set the Site URL and redirect URLs

In Supabase go to Authentication, URL Configuration. Set the Site URL to the address of your app and add it to the Redirect URLs. Without the redirect URLs, logins fail after the move.

SettingValue
Site URLYour new address, for example https://yourdomain.com
Redirect URLsEvery page people can land on after login, for example https://yourdomain.com/**
Redirect URLs for local testsThe local address your app prints when it starts
The Supabase URL Configuration page with the Site URL and two redirect URLs

4. Change the redirect at Google or GitHub

If people sign in with Google or another provider, change the redirect URL in that provider's settings to your new Supabase project.

5. Test with a real account

Use a real account from the live app, not a new one. Log in, reload the page, then log out and log in again. You should stay logged in after the reload and get back into the app each time.

The app settings on localhost after login, with the account name and the sign out link
Keep Lovable Cloud until the new project has run for a while. Removing Cloud from a project deletes its data for good.

Sources

  1. Lovable docs: Lovable Cloud
  2. Lovable docs: Advanced settings and Export data
  3. Supabase docs: Redirect URLs

Read next

Pick your route.

Choose where you are and where you want to go. The guide takes it from there.