Add Sign in with Google to your app, managed by Lovable with no setup or with your own Google Cloud OAuth credentials and consent screen.
This page documents Google authentication for your app’s users. It is available only for apps using the built-in backend. For an overview of all sign-in methods, see Users and authentication.
Sign in with Google lets people sign in with the Google account they already have, instead of creating a password for your app. Google has already verified their email address and passes it to your app.
Building an internal tool for your own workspace members? On Business and Enterprise, your app can recognize members who are logged in to Lovable, with no Google sign-in at all. See Reuse Lovable workspace identity in your app.
Choose a setup option
Users sign in the same way with both options. The options differ in who manages the credentials and what Google’s consent screen shows.
Option
Choose it when
Managed by Lovable (the default)
You want sign-in working without any setup. Lovable manages the OAuth client, the redirect handling, and the security updates.
Your own credentials
You want Google’s consent screen to show your own app name and verified domain, or you need to own the credentials for security or compliance reasons. You connect credentials from your own Google Cloud project and keep them current yourself.
Managed by Lovable (default)
Your own credentials
With Managed by Lovable, Google’s consent screen shows Lovable as the app that requests access. The first time a user signs in to your app, Lovable also shows its own consent page with your project’s name, which asks the user to share their email address and basic profile information.After the user approves, they return to your app, signed in. Lovable’s consent page does not appear again after their first sign-in to your app.
1
Ask Lovable to add Google sign-in
In the project chat, ask:
Add Google login to my app so that users can sign in with their Google account
Lovable enables Google sign-in in More → Users → Settings → Google. Lovable also adds the sign-in flow to your app: the Sign in with Google button, tracking who is signed in, and signing out. You can review the changes in the Details view.
2
Test the flow
Verify that:
a Sign in with Google button appears on your login page
users are redirected to Google to sign in
users return to the app in a signed-in state
users can sign out
With your own credentials, your Google Cloud project controls the consent screen, including the app name and branding. Lovable does not change the consent screen.
Go to More → Users → Settings → Google. Enable Google sign-in, select Your own credentials, and enter your Client ID and Client secret.
3
Add the redirect URIs in Google Cloud
Lovable can list more than one redirect URI: one for your default address, such as https://your-app.lovable.app, and one for each custom domain you added, such as https://www.yourdomain.com.In Google Cloud Console, add every redirect URI you plan to use as an Authorized redirect URI on your OAuth client.
Each redirect URI must match exactly, including the scheme, domain, path, and trailing slash.
4
Select the redirect URIs you added
Return to Lovable and select each redirect URI you added in Google Cloud, then click Save. Lovable sends Google one of the redirect URIs you select, so select only URIs you added in Google Cloud.When you enable Google sign-in in the settings, Lovable also sends a message to the project chat on your behalf and adds the Sign in with Google button to your app. That message is treated as standard build usage and consumes credits.
5
Add the sign-in button if your app does not have it
If Google sign-in was already enabled before you switched to your own credentials, ask in the project chat:
Add Google sign-in to my app using my own Google OAuth credentials.
Lovable adds the Sign in with Google button, which uses your own credentials.
6
Test the flow
Before you publish your app, verify that:
a Sign in with Google button appears on your login page
Google’s consent screen shows your app’s name
users return to the app in a signed-in state
users can sign out
Managing Google authentication
You can switch between Managed by Lovable and Your own credentials at any time from More → Users → Settings → Google. Switching does not affect existing user accounts, so users keep signing in with the same Google accounts.To stop offering Google sign-in, disable the provider in the auth settings. Lovable then sends a message to the project chat on your behalf and removes the Google sign-in button from your app. That message is treated as standard build usage and consumes credits. Users who signed up with Google keep their accounts but need another enabled sign-in method to get back in.If you use your own credentials and connect a custom domain later, Lovable adds a redirect URL for that domain to the list in More → Users → Settings → Google but does not select it, so Google sign-in keeps using your other selected redirect URIs. To use the new one, add it as an Authorized redirect URI on your OAuth client in Google Cloud Console first, then select it in Lovable and click Save. If you select it before you add it in Google Cloud, Google sign-in fails with a redirect URI mismatch error. Managed by Lovable needs no change when you connect a domain.
Some projects that set up their own credentials earlier show a third option, (Legacy) Your own credentials. (Legacy) Your own credentials is deprecated. Switch to Your own credentials to get automatic updates and the current branding and security features.
Troubleshooting your own credentials setup
Redirect URI mismatch
The redirect URIs you selected in Lovable do not match the Authorized redirect URIs on your OAuth client. Add every URI you selected in Lovable to Google Cloud, and check that each one matches exactly, including the scheme (https) and any trailing slash.
Google blocks sign-in at the consent screen
Check the OAuth consent screen configuration in Google Cloud. If your Google Cloud app is not published, add your own account as a test user.
Sign-in fails with a mobile or desktop OAuth client
Lovable’s redirect flow needs an OAuth client of type Web application. Mobile and desktop client types do not work with it. Create a Web application client and enter its credentials in Lovable.
Google sign-in still does not work
Check that Google sign-in is enabled in More → Users → Settings → Google, and that the Client ID and Client secret match your OAuth client. If both are correct, ask Lovable in the project chat to check that your app’s sign-in button is connected to the backend.
FAQ
Is the Lovable-managed Google authentication available for all Lovable apps?
No. Managed by Lovable Google authentication is available only for apps using the built-in backend.
Can I use Google authentication without the built-in backend?
Yes, but you set it up yourself outside Lovable. For example, you might:
integrate Google OAuth directly in your frontend or backend code
use Google’s One Tap or standard OAuth sign-in flows
use a third-party authentication service such as Supabase Auth
manage OAuth credentials, redirect handling, and sessions yourself
This page covers Google sign-in on the built-in backend only.
Should I use the managed by Lovable option or my own credentials?
Use Managed by Lovable unless you specifically need to manage your own Google Cloud OAuth credentials or customize the consent screen branding.
What information does Google share with my app?
Google provides the user’s email address and basic profile information. Your app does not get access to other data in the user’s Google account, with either setup option.
Do users see the Google consent screen every time they sign in?
No. Lovable’s consent page appears only the first time a user signs in to your app with Google.
Can I switch between "managed" and "your own credentials" later?
Yes. You can switch between Managed by Lovable and Your own credentials at any time. Existing user accounts are not affected.
Why am I seeing a redirect URI mismatch error?
The redirect URLs you selected in Lovable usually do not exactly match the Authorized redirect URIs in Google Cloud.
Add every redirect URL you selected in Lovable to Google Cloud.
Check the scheme, domain, path, and trailing slashes.
Does Google authentication replace email/password sign-in?
No. Google authentication is an additional sign-in method. You can offer Google sign-in alongside other authentication methods.
Can a native app built outside Lovable use Google's native sign-in with my project's backend?
Not when Google’s native sign-in uses a separate client ID for the app. Lovable accepts one client ID for Google sign-in: its own with Managed by Lovable, or the one you enter with your own credentials. Instead, have the app open Google sign-in in the browser. Add the app’s custom scheme, such as myapp://callback, to Redirect URLs in the auth settings. See Site URL and redirect URLs.
Do I need to configure Google Cloud Console when using "Managed by Lovable" setup?
No. You configure Google Cloud Console only when you use your own credentials.
Was this page helpful?
Assistant
Responses are generated using AI and may contain mistakes.