KBAISE/ for lovable
Library
Docs

Connect apps to Lovable with OAuth

about 10 minShippingchecked 9d agoOfficial page
The short version

You can connect external apps or custom tools to Lovable accounts using OAuth. This lets your app safely access user projects and profile details without sharing passwords.

Workspace owners and admins who want to connect custom tools, dashboards, or external apps to act on behalf of Lovable users.

Do this, in order

  1. 1

    Go to Workspace settings, select 'API keys & OAuth', open the 'OAuth clients' tab, and click 'New OAuth client'.

    This opens the registration form required to create your app's credentials.

  2. 2

    Select your application type as either 'Single-page app' or 'Web server'.

    Your choice determines whether your app requires a secret key, and this setting cannot be changed after creation.

  3. 3

    Enter a descriptive name and add your application's secure callback address under 'Redirect URIs'.

    Lovable uses this URL to send users back to your application after they approve access.

  4. 4

    Select the permission scopes your app needs, adding 'offline' if you need refresh tokens.

    Your app will only be permitted to request the specific access levels you enable here.

  5. 5

    Click 'Register client' and immediately copy your Client ID and Client Secret.

    The client secret is displayed only once and cannot be viewed again.

  6. 6

    Click 'Apply for approval' next to Verification if you selected sensitive project or workspace scopes.

    Until Lovable verifies your app, users will see an unverified warning screen when logging in.

Paste this into your project

Set up an authentication connection flow for our app that integrates with Lovable OAuth using authorization code flow with PKCE (S256). Use environment variables for the Lovable Client ID, handle the redirect callback URL securely, and request the 'openid', 'profile', and 'offline' scopes to retrieve and refresh user credentials.

Words decoded

OAuth
A secure sign-in standard that lets an app access your account data without you having to give it your password.
Scope
A specific permission level defining what data an app can read or modify on your behalf.
Redirect URI
The web address where Lovable sends the user right after they grant permission.
Client Secret
A private password known only to your server and Lovable to verify your app's identity.
PKCE
A security verification check that prevents attackers from intercepting authorization codes.

Where people get stuck

  • The client secret is shown only once during creation; generating a new one immediately breaks connections in existing apps until updated.
  • Sensitive scopes (such as modifying projects or workspaces) require a Business or Enterprise plan and trigger review approval before the unverified warning disappears.
  • You cannot switch the application type between Single-page app and Web server after registration.
  • Your workspace can have a maximum of 20 OAuth clients at any time.
  • Only workspace owners and admins have access to the OAuth clients settings.

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.