KBAISE/ for lovable
Library
Docs

Add OpenID Connect (OIDC) sign-in to your app

about 15 minBuildingchecked 6d agoOfficial page
The short version

Connect your organization's login service so users can sign into your app with work accounts like Okta or Microsoft. You configure this through your project settings, and Lovable automatically builds the login button into your app.

Makers building internal tools or B2B apps who need users to sign in using their company identity provider.

Do this, in order

  1. 1

    Navigate to More → Users → Settings, select OIDC, and toggle on OIDC sign-in.

    This reveals your project's Redirect URI needed by your identity provider.

  2. 2

    Copy the Redirect URI from Lovable.

    Your identity provider needs to know exactly where to send users back after they sign in.

  3. 3

    Create an OpenID Connect web application in your identity provider and paste the Redirect URI into its redirect settings.

    This authorizes your Lovable app to request user sign-ins from your provider.

  4. 4

    Copy the Issuer URL, Client ID, and Client secret from your identity provider.

    Lovable needs these credentials to communicate securely with your identity provider.

  5. 5

    Paste the Issuer URL, Client ID, and Client secret into the Lovable OIDC settings form and click Save.

    Saving activates OIDC authentication and triggers Lovable to automatically build the sign-in button into your app.

  6. 6

    Open your app's login page in an incognito or private browser window and test the new sign-in button.

    Testing in a private window verifies that the login flow works without interference from existing login sessions.

Paste this into your project

Style our sign-in page to make the OIDC login button prominent and clearly labeled for company employees, keeping the layout clean and responsive.

Words decoded

OIDC (OpenID Connect)
A standardized login system that lets users sign into your app using an account they already have elsewhere, like Google, Okta, or Microsoft.
Identity provider
The service that stores your users' passwords and confirms who they are, such as Okta, Auth0, or Microsoft Entra ID.
Redirect URI
The exact web address where the identity provider sends users back after they log in.
Issuer URL
The web address of your identity provider that verifies its authenticity.
Client ID & Client Secret
The username and password pair that your identity provider issues specifically for your app.
Scopes
The specific pieces of personal information (like email address and name) that your app is allowed to request from the login provider.

Where people get stuck

  • Never paste your Client Secret into the project chat; only enter it directly into the More → Users → Settings → OIDC form.
  • Do not include '/.well-known/openid-configuration' at the end of the Issuer URL, and ensure it begins with 'https://'.
  • On Business and Enterprise workspaces, ensure SSO is allowed under App login methods, or OIDC sign-in will be blocked.
  • Saving the OIDC form triggers an automatic app build that consumes credits.
  • OIDC is only supported on the built-in Cloud backend, not on self-hosted backends.
  • You can only connect one OIDC identity provider per project.

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.