App user connectors: let your users connect their own accounts
App user connectors let each person using your Lovable app connect their own accounts from other services, like Gmail or Salesforce. This means your app can work with their personal data, like their emails or customer records, instead of a single shared account.
Anyone building an app where each user needs to connect their own personal accounts to the app, such as for their own email or calendar.
Do this, in order
- 1
Register an OAuth application with the third-party service (e.g., Google, Salesforce) you want to connect to.
This creates the 'client' identity for your app with that service, allowing it to request access to user accounts. You'll get details like a client ID and secret.
- 2
Add Lovable's connector gateway callback URL (`https://connector-gateway.lovable.dev/api/v1/app-users/oauth2/callback`) to your OAuth app's allowed redirect URIs on the third-party service.
This tells the third-party service where to send users back after they've approved your app, so Lovable can securely handle the connection.
- 3
Go to 'Connectors' in your Lovable workspace, select the provider, and add a new client using the OAuth application details you registered.
This configures Lovable to use your specific OAuth app for that service, linking it to your workspace.
- 4
Link this newly configured client to the specific project where you want to use the app user connector.
This makes the connector available for use within that particular app project.
- 5
Ensure your app has a way to identify individual users, either by using Lovable's built-in authentication or your own system.
Each user's connection is personal, so Lovable needs to know who is currently signed in to link their account correctly.
- 6
In your Lovable project chat, describe what you want your app to do with the connected service for each user.
This tells the Lovable Agent to create the 'Connect' button or flow in your app, allowing your users to link their own accounts.
Paste this into your project
Let my users connect their own Gmail so the dashboard shows their inbox.
Words decoded
- OAuth application
- A special registration you create with a service (like Google or Salesforce) that identifies your app and allows it to ask users for permission to access their data.
- Client ID and secret
- Unique codes given to your registered OAuth application that Lovable uses to securely identify itself to the third-party service.
- Connector gateway
- Lovable's secure system that handles all the technical details of connecting to other services, like storing user passwords safely and refreshing connections.
- Callback URL
- A specific web address that the third-party service sends users back to after they've given your app permission to access their account.
- Multi-tenant
- An app designed to serve many different users, where each user has their own separate data and experience.
- Scopes
- Specific permissions that a user grants to your app, like 'read my emails' or 'access my calendar,' which limit what your app can do with their account.
Where people get stuck
- Forgetting to add Lovable's callback URL to your OAuth app's allowed redirect URIs will prevent users from successfully connecting their accounts.
- Not having user authentication in your app will prevent Lovable from knowing which user to link a connected account to.
- Choosing a standard connector instead of an app user connector if you intend for each user to connect their own personal account, leading to all users sharing a single account's data.
- Not understanding that setting 'Allow offline access' is fixed once the client is linked to a project, requiring unlinking to change it later.
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.