⚡ TL;DR Register an OAuth client, then use the one-script SDK button or a standard OIDC code flow with PKCE. Free on all plans; access tokens last 8 hours and the offline scope adds refresh tokens.
One-click login for anyone with a Lovable account, on any site.
🔑 Setup
An owner or admin registers a client under Workspace settings, API keys & OAuth, choosing Single-page app (SDK) or Web server (OIDC). The type cannot change later.
⚡ SDK Route
Load the script, add the client ID and scope meta tags and a #lovable-signin div, then listen for LovableSignInOnSuccess and store the stable sub ID.
🛡️ OIDC Route
The flow:
- ✅ Generate state, nonce and a PKCE verifier
- ✅ Redirect to /oauth/authorize
- ✅ Exchange the code within 10 minutes
- ✅ Verify the ID token or call userinfo
🔄 Sessions
Access tokens last 8 hours; request offline for refresh tokens, and revoke on sign-out.
💡 Pro tip Keep client secrets on the server; browser-only apps should use a single-page client with PKCE.
Need OAuth integration built? Lord of the Wix can help. ✨
❓ Sign in with Lovable FAQ
Does it cost anything?
No, it is free on every plan.
Do I need the SDK?
No, any OIDC library works.
Is PKCE required?
Yes.
How long do tokens last?
8 hours.
Which ID should I store?
The sub claim.
🙏 Credit: Based on public information from the Lovable documentation. Lovable is a product of Lovable. Source: docs.lovable.dev. Lord of the Wix is an independent agency and is not affiliated with Lovable.