In short.
Sign in with Lovable is a setup guide for web developers adding Lovable account login, and every user must have or create a Lovable account. It covers a hosted JavaScript SDK and direct OpenID Connect, including client registration, mandatory PKCE, token validation, renewal and revocation. The server-based route leaves your application to establish its own session. The documentation states that the feature is free on all plans; runtime behavior has not been assessed.
Researched and written by an AI model and checked by a second AI model. How it works
Coverage is the complete selected page at [https://docs.lovable.dev/integrations/sign-in-with-lovable.md], including the SDK route, direct OpenID Connect flow, prerequisites, security notices, renewal guidance, FAQ and separate instructions for apps built with Lovable. All linked pages, the documentation index, hosted SDK contents and live endpoints are excluded. No software was executed; runtime operation, interoperability, performance and security assurance remain unassessed.
The overview
Identity
This Lovable documentation page teaches developers how to let people authenticate to an external website or app using their Lovable account. Its original address is [https://docs.lovable.dev/integrations/sign-in-with-lovable.md].
The page specifically addresses applications built outside Lovable. For applications built with Lovable, it instead directs developers to More → Users → Settings and says Lovable registers the OAuth client automatically.
Assessment
The guide provides a practical implementation reference: it explains registration choices, button integration, identity fields, failure events, token verification and session renewal. Beginners get a short SDK route, while developers using a server get the underlying protocol steps.
Its usefulness is specific to offering Lovable account login. The page does not establish operational reliability, interoperability with particular libraries or the completeness of an application's overall account-management design.
Users
Browser-only site developers can use the SDK to draw a button and receive sign-in details. Developers with a backend or an existing OpenID Connect library can control the redirect, token exchange and application session themselves.
Visitors need a Lovable account, although they can create one during sign-in. The button authenticates a Lovable account; creating a corresponding account or user record in your application remains a separate application concern.
Capabilities
The SDK supplies the button appearance, opens a sign-in window and emits success or failure events. It supports light or dark buttons, several labels, full-width display and a custom button through LovableID.auth.signIn(). It also exposes the current user through LovableID.auth.getInstance().getUser().
Requested scopes determine whether the application receives a name, picture or email address. The stable sub value identifies the person even if their name or email changes. The SDK returns emailVerified, while the documented OpenID Connect claim is email_verified.
The SDK remembers sign-in across page refreshes and documents automatic renewal when offline is requested. It can also provide only the button, with a custom click handler directing visitors to a server-managed login route.
Using it
Requirements
A workspace owner or administrator must register an OAuth client, which identifies the requesting application to Lovable. Choose Single-page app for browser-side completion or Web server for server-side code exchange. The application type cannot be changed after registration, and a Web server client's secret must remain on the server.
The site must use HTTPS, except for local development addresses with an exactly matching port. Register all requested scopes: openid is required, profile requests name and picture, email requests the email address, and offline enables refresh tokens.
For the SDK, register the site's origin, including its port if present, with no path or trailing slash. For direct OpenID Connect, register the complete callback address. Redirect addresses must match the registration requirements exactly.
Mechanism
OpenID Connect is the standard identity protocol behind the button. The guide uses the authorization-code flow with PKCE, a mechanism that binds the code exchange to the application that initiated it. Lovable requires PKCE even for server clients with a secret.
Each attempt generates state, nonce and a PKCE verifier with its SHA-256 challenge. The application checks state once when the visitor returns, then exchanges the one-time code within ten minutes of receiving it. Browser clients send client_id without a secret; server clients authenticate with their secret.
Before trusting the signed ID token, verify its signature, issuer, audience, expiry and nonce. The documented discovery address is [https://lovable.dev/oauth/.well-known/openid-configuration], with signing keys at [https://lovable.dev/oauth/keys]. An access token can also retrieve identity claims from [https://lovable.dev/oauth/userinfo].
Access tokens last one hour. Requesting offline supplies a refresh token; if renewal returns a replacement refresh token, store and use it. The guide directs applications to revoke the refresh token on sign-out and says Lovable's Log out everywhere action also invalidates connected sign-ins.
Setup
For SDK integration, register the client and load [https://sdks.lovable.dev/sign-in-with-lovable/index.js]. Supply the client ID and scopes through the documented meta tags, then place a div with id lovable-signin where the button should appear. Alternatively, configure LovableID.auth.init() and call LovableID.auth.renderButton(). JavaScript settings override matching meta-tag settings.
Listen for LovableSignInOnSuccess to receive event.detail.user and LovableSignInOnFailure to receive event.detail.code. Save sub if maintaining local user records.
For server integration, configure an OpenID Connect library with discovery, client credentials, callback address and scopes. Complete token validation before establishing your application's session, such as through its own session cookie.
Example
For a browser-only site at [https://example.com], the documented approach is to register a Single-page app client with that origin, enable openid and email, and request those same scopes in the page configuration. Add the SDK and button container, then handle LovableSignInOnSuccess to obtain the visitor's sub and available email fields.
If the application later needs server-managed sessions, the SDK button can redirect to /login while the server performs OpenID Connect with a registered callback such as [https://example.com/callback]. These examples describe the documented setup; neither was executed.
Assessment & evidence
Limitations
Login depends on visitors having or creating a Lovable account. SDK sign-in may fail if a visitor closes the window, declines consent or has pop-ups blocked. The page describes a browser-remembered sign-in but does not specify the SDK's underlying token-storage mechanism.
Longer sessions require offline access and successful refresh. Refresh tokens can expire or be invalidated, requiring another sign-in. Token lifetimes do not by themselves define how long your application's own session should last.
The guide does not provide measured availability, performance, browser-compatibility results or a security audit. Those properties have not been assessed.
Fit for the work
The SDK is the more direct fit when a site needs browser-managed login and a ready-made button. Direct OpenID Connect fits applications that already have server sessions or an identity library and need control over each step.
The decision is not exclusive: the SDK can supply the button while the server handles authentication. The remaining fit question is whether requiring a Lovable account suits the site's audience and whether the application is prepared to manage its own records and sessions.
Alternatives
The page presents two implementation alternatives for the same identity provider: the hosted SDK and direct OpenID Connect through a library or custom code. For apps built within Lovable, it points to the built-in user settings instead.
No other identity providers are compared. Relative costs, capabilities and migration effort for competing login services are unknown from this evidence.
Evidence
The evidence consists of the complete selected documentation page at [https://docs.lovable.dev/integrations/sign-in-with-lovable.md]. It contains implementation instructions, SDK examples, protocol steps and stated service behavior.
Linked registration, scope, endpoint and account-settings pages were excluded. The hosted SDK and live authentication endpoints were not inspected or executed. The documented behavior has not been independently demonstrated.
Access & freshness
Costs
The documentation explicitly states that Sign in with Lovable costs nothing to use and is available on all plans. It does not provide usage quotas, rate limits, wider Lovable subscription prices or costs for hosting your own application. Those details are unknown from this page.
Rights
The page supplies no licence statement for its documentation, code samples or hosted SDK. Permission to redistribute those materials is therefore unknown from the supplied evidence.
It describes visitors consenting to requested identity scopes before information is shared. It does not supply privacy terms, data-retention rules or a broader agreement governing how applications may use that information.
Freshness
The supplied page was captured on 24 November 2026 at 05:56:44 UTC. It provides no publication date, last-updated date, SDK version or support schedule.
The hosted SDK address contains no explicit version identifier. Changes after the capture and the current behavior of that hosted file are unknown.
Next steps
Choose browser-managed or server-managed sign-in before registering the client, because the application type cannot be changed afterward. Register the appropriate origin or callback and request only the identity scopes the application uses.
Connect the returned sub to any local user record and decide how application sessions should behave. For the server route, use an OpenID Connect library to perform the documented token checks.
Before deployment, verify successful sign-in, declined consent, blocked pop-ups where applicable, refresh behavior and sign-out in the intended environment. Confirm any needed usage limits and privacy terms separately; these steps have not been performed.
