Locoia
  • Overview
  • Account and User Settings
    • User types
    • Adding Users
    • Teams
    • Access Permissions
    • 2 Factor Authentication 2FA
    • Versioning and Snapshots
    • Activity Log
  • Reset your Password
  • Invoices and Payments
  • Automation
    • Flow Builder
      • Flow Building Best Practices
      • Jinja Template Language
        • Jinja: (Custom) variables, wildcards and functions
        • Magic Code Samples
      • Connectors & APIs
        • Titles and References
        • Referencing data of objects, lists, arrays - how to pass data dynamically
        • Accessing Objects with JSONPath
        • Merging nested JSON objects
        • Parsing JSONs from String
        • Response Headers & Status Codes
        • Custom Data Fields
        • Wildcard API calls and actions
        • Response cleaning
      • Text Strings, Date & Time, Numbers and Currencies
        • Text and Strings
        • Dates & Time
        • Numbers (Thousand Separators, Currencies)
      • Email-formatting
      • Code Fields
      • Running single Flow steps
      • Flow run data retention, logging, and error notifications
      • Advanced View
      • Dynamic Title
      • Custom Error Handling
      • Error Handling Flows
      • Automatic Pagination
    • Flow Debugger
      • Automatic Retrying
      • Run Flows again
      • Troubleshooting Flows
    • Community Library
  • Connectors & Helpers
    • Connectors
      • Monday.com
      • ActiveCampaign
      • Aircall
      • Allthings
      • Amplitude
      • Animus
      • Assetti
      • Awork
      • AWS RDS Database - How to connect
      • bubble.io
      • Casavi
      • Chargebee
      • CleverReach
      • comgy
      • commercetools
      • Everreal
      • Exact Online
      • Facebook Marketing
      • Fahrländer Partner
      • FastBill
      • FILESTAGE.io
      • Freshdesk
      • Freshsales
      • Google Ads
      • Google Ads Lead Form
      • Google Analytics
      • Google Chat
      • Google Drive
      • Google Sheets
      • Gmail
      • HubSpot
      • Heyflow
      • iDWELL
      • ImmobilienScout24
      • Instagram Ads
      • Intercom
      • klaviyo
      • Kiwi Opening Doors
      • Klenty
      • Klipfolio
      • Kolibri CRM
      • konfipay
      • KUGU
      • Shopify
      • S3 AWS
      • SQS AWS
      • Lambda AWS
      • Learnster
      • lexoffice
      • LineMetrics
      • Linkedin
      • Locoia
      • Notion
      • MailGun
      • Makula
      • Microsoft Dynamics 365
      • Microsoft OneDrive
      • MixPanel
      • MongoDB
      • Odoo
      • OnFleet
      • OnOffice
      • Oracle NetSuite
      • Outbrain
      • Quickbooks
      • Trello
      • PandaDoc
      • Personio
      • Pinterest Ads
      • Pipedrive
      • Plentific
      • PriceHubble
      • relay
      • REALCUBE
      • Sage ERP
      • Salesforce
      • SAP
      • Scoro
      • Seafile
      • sevDesk
      • SharePoint
      • SharpSpring
      • Slack
      • Snapchat Marketing
      • Snowflake
      • Teamleader Focus
      • Teamwork.com
      • Tableau
      • TikTok
      • TinQwise
      • The Trade Desk
      • Twitter
      • Typeform
      • WordPress
      • Xero
      • Youtube
      • Zendesk
      • Zoho CRM
      • Zoom
    • Helpers
      • Scheduler
      • Webhook
      • Dict Helper
      • Spreadsheet Helper
      • REST Helper
      • Boolean Helper
      • Multi Case Helper
      • Looper
      • FTP Helper
      • CSV Helper
      • XLSX Helper
      • Mail Sender
      • Flow Trigger
      • File Storage Helper
      • Terminate Helper
      • Delay Helper
      • SQL Connector
      • PDF Helper
      • Zip Helper
      • Data Warehouse Helper
      • XML Helper
      • Form Helper
      • Arrow
      • Error Arrow
    • Authentication Types Available
      • Setting up authentication
      • OAuth1
      • OAuth2
      • Refreshable token
      • AWS Signature
      • Basic Auth and Other Simple Authentication Methods
      • How are API versioning and API updates handeled?
      • Custom OAuth2 clients (apps)
    • Building Connectors
      • Base Connector Setup
        • Connector Auth Validation
        • GraphQL APIs
        • Rendering with User Input
      • Building Connector Actions
        • Actions Examples
      • Search Automation
      • Pagination Automation
      • Uploading Files in Actions
      • Working with SOAP APIs
    • Super Actions
    • Webhook Trigger for Connectors
    • Data Mapping and Env Variables
  • Embed - White Label Portal
    • Embed Overview
      • 1. Embed Flow
        • 1.1 Creating Embed Flows
        • 1.2 Updating Embed Flows
        • 1.3 Embed Error Handling
        • 1.4 Setting up Callbacks for Integration activation/deactivation
        • 1.5 Setting up Remote search
        • 1.6 Setting up End User logs
      • 2. Configure Embed
        • 2.1 Embed Integration via SSO
        • 2.2 Proprietary connector setup
        • 2.3 Sharing level
        • 2.4 Consent screen
        • 2.5 Account Secrets
        • 2.7 Further settings
      • 3. Integrate Embed
        • 3.1 iframe vs native embed
        • 3.2 Customizing CSS
        • 3.3 Events emitted from iframe to parent window
      • 4. Embed for End User
        • 4.1 Embed Remote Search
        • 4.2 Embed End User Logs
      • 5. Test Embed Configuration
        • Testing example
      • 6. Embed Integrations and Connector Auths
    • Embed FAQs
  • Data and Dashboards
    • Dashboards & Insights
      • Introduction to Dashboards
      • Introduction to Insights
      • Introduction to Data Sources
      • Dashboard Filters
      • Insight Marketplace - Using Pre-Built Insights
      • Writing SQL Queries
      • Useful SQL Examples
      • Charts
        • Line Chart
        • Bar and Horizontal Bar Chart
        • Stat Card
        • Pie Chart
        • Gauge Chart
        • Donut Chart
        • Stacked Bar, Horizontal Stacked Bar, and Normalized Horizontal Stacked Bar
        • Multiple Line Chart
        • Pivot Table
        • Map Chart
  • Best Practice Guides
    • Integration Best Practices
    • Integration Check List
    • CSV Files in Excel
    • Multi-Tenant Flows
    • On-Premise Integrations
    • Database Connection Setup
    • Data and General Security
    • Using Tags
    • FAQ
  • API
    • Locoia API Authentication - Personal Access Token
    • Create Connector Authentication
  • Contact us
  • Status of Service
  • Data Privacy
  • Imprint
Powered by GitBook
On this page
  • 1. Passing data to Locoia
  • 2. Creating JWT
  • 3. Creating the white label iframe within your app

Was this helpful?

  1. Embed - White Label Portal
  2. Embed Overview
  3. 2. Configure Embed

2.1 Embed Integration via SSO

How to setup the white label integration portal for SaaS companies with SSO

Previous2. Configure EmbedNext2.2 Proprietary connector setup

Last updated 1 year ago

Was this helpful?

The below steps explain how you can integrate the Embed (integration white label portal) into your own SaaS application.

In order to ensure that only your app can show the iframe and to connect your users' identity with the integrations (Flows) they might add you have to create a JWT which has to be dynamically passed. You can see a detailed setup guide below.

1. Passing data to Locoia

SSO means single sign-on. This method allows SaaS company's end customers to enable integrations using Locoia without needing to log in - the most native way possible.

SSO with a JWT claim, as per the payload-example below:

{
  "embed_user_id": "1234567890",
  "embed_user_name": "John Doe",
  "embed_account_id": "2345678545678",
  "embed_account_name": "ABC Ltd.",
  "embed_state": {
    "your_custom_field": "your_custom_value",
    "your_custom_field_2": "your_custom_value_2"
  },
  "client_authentication": {
    "auth_type": "username_password",
    "connector_id": "proprietary_connector_id",
    "name": "connector_auth_name",
    "auth_token": "",
    "auth_details": "",
    "api_endpoint": "",
    "refresh_token": "",
    "user_input": {},
    "password": "end_user_password",
    "username": "end_user_username"
  },
  "iat": 1516239022,
  "exp": 1516539022
}

JWT payload explained:

  • embed_user_id: id of the end-user - required

  • embed_user_name: name (first and last) of the end-user - optional

  • embed_account_id: your account id of your end-customer - required

  • embed_account_name: your account name of your end-customer - optional

  • embed_state: A string or dictionary to pass all kinds of values that you want to be accessible by the created embed flow - optional

  • exp: expiry time stamp in epoch seconds - required

  • iat: issued timestamp in epoch seconds - required

2. Creating JWT

Here are code examples in Python and node.js to convert the payload with JWT and a secret to the jwtToken. You can find a secret in Embed details.

# Preparing the JWT based on a payload and secret.

import jwt
import time

secret = "secret can be found in your Locoia account upon creation of embed"
epoch_time = int(time.time())

# epoch time plus 1 hour
payload =  {
    "embed_user_id": "1234567890",
    "embed_user_name": "John Doe",
    "embed_account_id": "2345678545678",
    "embed_account_name": "ABC Ltd.",
    "iat": epoch_time,
    "exp": epoch_time + 3600
}

jwtToken = jwt.encode(
    payload,
    secret,
    algorithm="HS256",
    headers={"alg": "HS256", "typ": "JWT"}
)

# Print jwtToken
print(jwtToken)

# Output: eyJhbGciOiJIUzI1Ni ... cPZg
import {SignJWT} from "jose";
const secret = 'secret can be found in your Locoia account upon creation of embed';
    const payload = {
        embed_user_id: '1234567890',
        embed_user_name: 'John Doe',
        embed_account_id: '2345678545678',
        embed_account_name: 'ABC Ltd.'
    };

    const signJWT = new SignJWT(payload)
    signJWT.setProtectedHeader({
        alg: "HS256"
    })
    signJWT.setIssuedAt(Date.now())
    signJWT.setExpirationTime(Date.now() + 3600)
    const token = await signJWT.sign(new TextEncoder().encode(secret))

Similar examples can be found for other languages.

3. Creating the white label iframe within your app

In Embed details you can also find the iframe code. Here you only need to replace the jwtToken with the token - as per the above creation example.

<iframe
  id="embedded"
  name="embedded"
  src="https://api.locoia.com/embedded?embeddedId={UUID4 provided by the app}&token={jwtToken}&lang=de"
  style="border-style: none; width: 100%; height: 1000px;"
>
</iframe>

client_authentication: A dictionary with the connector auth details for the proprietary connector specified in the embed. You can find - optional

more details here
How to setup white label integrations as a SaaS company + SSO