Locoia
Search…
1.3 Proprietary connector setup
Using Embed to connect your own software to many other SaaS apps you obviously may not want your users to have to manually enter their login details themselves. You can make use of a proprietary connector in Embed in order to automatically create a connector auth for your end users of your own connector so that they don't have to enter their credentials for it in the iframe.

1. Select your connector in the embed configuration

In the Embed configuration, simply select the connector that you want to use as the proprietary connector for this embed. The connector ID will then be displayed in the field below.

2. Add the client_authentication dictionary to the JWT

In the JWT you need to add the client_authentication dictionary with the following content:
1
"client_authentication": {
2
"auth_type": "basic_auth",
3
"connector_id": "d4...",
4
"name": "Embed - Stripe - User123 - 23523",
5
"auth_token": "very_secret_token",
6
"auth_details": "",
7
"api_endpoint": "",
8
"refresh_token": "",
9
"user_input": {},
10
"password": "",
11
"username": ""
12
}
Copied!
  • auth_type - The same that you can see when you're setting up a connector auth in Locoia. E.g. for Stripe this would be basic_auth. A complete list of the types can be found here.
  • connector_id - The connector id that you received in the first step
  • name - The name of the connector auth. We recommend use a combination of the end users id or name, the connector name and some reference to embed
  • All other parameters depend on the specific connector that you're using. E.g. for Stripe, the auth_token needs to be passed
Finally, you need to include this dictionary in your JWT on every page view, so that the most recent credentials are always synced to the corresponding connector auth, and thus, the flows that use them in Locoia.
Last modified 2mo ago