Subscribe

Add Sign in with Lovable to your site

Lovable adds a sign-in page that lets visitors sign in with their Lovable account and stores profile info.

When to use it

Your community portal needs users to sign in with their Lovable account to access premium features.

Why it is worth it

You can secure your app without managing passwords, and Lovable users sign in with one click.

Before you start

  1. Create an OAuth client in workspace settings and copy your client ID

Paste this into Lovable's chat to add the sign-in flow to your project.

The prompt

Add a sign-in page to the home page. When someone clicks 'Sign in with Lovable', they should be directed through Lovable's sign-in flow using the client ID from your workspace settings. After they sign in, save their name, email, and profile picture in the auth_users database table. If they are not already in the table, create a new record. Show a welcome message with their name in the top navigation once they are signed in. Add a sign-out button that ends their session.

Swap the home page, database table name, and navigation location for your own app.

What you get

Your site has a sign-in page where visitors can sign in with their Lovable account and access your app.

From docs.lovable.dev/changelog#add-sign-in-with-lovable-to-any-website

More build tips

All tips

Get the Loop every week.

New Lovable features and the prompts to use them, in one short email. Free, and you can leave any time.

Prompt copied