Overview
Lovable supports Sign in with Google using industry-standard OAuth 2.0, allowing users to authenticate with their Google accounts instead of creating a password. Google authentication in Lovable Cloud can be configured in two ways:- Managed by Lovable: Lovable manages the OAuth client, credentials, redirect handling, and security updates. This is the default and recommended setup.
- Your own credentials (sometimes referred to as BYOK): You connect OAuth credentials from your own Google Cloud project and manage credential security and rotation.
- The user clicks Sign in with Google in your app
- Google displays a consent screen
- The user reviews and approves access
- Google redirects the user back to your app, signed in
- a Client ID (identifies the application)
- a Client secret (authorizes the application)
- redirect URLs (where Google sends users after approval)
Why use Google sign-in
Google sign-in provides a familiar authentication experience and reduces friction during signup and login.- Faster onboarding without password creation
- Trusted Google consent experience
- Reduced password reset and account recovery overhead
- Pre-verified email addresses provided by Google
- Reliable user identity with profile information
Common use cases
Google sign-in is commonly used for:- Consumer applications where social login is expected
- SaaS products targeting professional users
- Internal tools using Google Workspace
- E-commerce accounts and order history
- Communities or products that require verified email addresses
Google authentication setup options
Lovable Cloud supports setting up Google authentication in two ways:- Managed by Lovable
- Your own credentials
- Managed by Lovable (default)
- Your own credentials
- want the simplest setup
- do not want to configure Google Cloud manually
- do not need ownership of OAuth credentials
- do not need custom OAuth scopes beyond the defaults (email and basic profile)
- Shows your application name
- Indicates that the app is requesting access via Google authentication
- Requests access to the user’s email address and basic profile information
Prompt Lovable to add Google authentication
- configure Google OAuth in the backend
- create or update sign-in UI components
- set up authentication state management
- add sign-out functionality
Test the flow
- a Sign in with Google button appears
- users are redirected to Google for authentication
- users return to the app in a signed-in state
- the consent screen behaves as expected
- users can sign in and sign out successfully
Managing Google authentication
You can switch between Managed by Lovable and Your own credentials at any time from Cloud → Users → Auth → Google. Switching the Google authentication setup does not affect existing user accounts. Users can continue signing in with the same Google accounts.Troubleshooting “Your own credentials” setup
Redirect URI mismatch
Redirect URI mismatch
- Ensure every redirect URL you selected in Lovable is added to Google Cloud
- Check for missing or extra trailing slashes
- Verify the scheme (
httpsvshttp) matches exactly
Consent screen issues
Consent screen issues
- Ensure the OAuth consent screen is configured correctly in Google Cloud
- Add your account as a test user if the app is not published
- Verify required scopes are configured
Wrong OAuth client type
Wrong OAuth client type
- Use a Web application OAuth client
- Mobile or desktop client types are not compatible with Lovable’s redirect flow
Authentication not working
Authentication not working
- Confirm Google sign-in is enabled in Users → Auth → Google
- Verify
Client IDandClient secretvalues (your own credentials setup) - Ensure authentication UI is connected to the backend
FAQ
Is the Lovable-managed Google authentication available for all Lovable apps?
Is the Lovable-managed Google authentication available for all Lovable apps?
Can I use Google authentication in apps not using Lovable Cloud?
Can I use Google authentication in apps not using Lovable Cloud?
- 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 session logic yourself
Should I use the managed by Lovable option or my own credentials?
Should I use the managed by Lovable option or my own credentials?
What information does Google share with my app?
What information does Google share with my app?
Do users see the Google consent screen every time they sign in?
Do users see the Google consent screen every time they sign in?
Can I switch between "managed" and "your own credentials" later?
Can I switch between "managed" and "your own credentials" later?
Why am I seeing a redirect URI mismatch error?
Why am I seeing a redirect URI mismatch error?
- Ensure every redirect URL you selected in Lovable is added to Google Cloud.
- Check the scheme, domain, path, and trailing slashes.
Does Google authentication replace email/password sign-in?
Does Google authentication replace email/password sign-in?
Do I need to configure Google Cloud Console when using "Managed by Lovable" setup?
Do I need to configure Google Cloud Console when using "Managed by Lovable" setup?