Embedding authentication
As an alternative to building your own authentication flow, Polytomic Connect can handle all authentication to your customers’ systems, whether to databases, data warehouses, CRMs, cloud buckets, spreadsheets, or even arbitrary HTTP APIs. Through an API call to Polytomic Connect, you can present your users with Polytomic-generated authentication flows without worrying about building the right input form or OAuth flow.
For example, here are example modals generated by Polytomic Connect to authenticate to HubSpot and Snowflake:
Polytomic supports many other integrations. For each one, you’re able to pop up authentication modals like the above without having to know what authentication parameters are required.
Modal appearance options
Whitelisting integrations
You can restrict the set of integrations your customers can connect to by setting the whitelist
argument to an array of whitelisted integrations.
If you only want to allow one type of integration, you can pass a single string to the whitelist parameter. For example, if you only want to allow connections to Salesforce, you can pass ["salesforce"]
. When the user opens the modal, they will be presented with a form to authenticate to Salesforce.
If you want to allow connections to multiple types of integrations, you can pass an array of strings to the whitelist
argument (for example, ["salesforce", "hubspot"]
). In this case, when the user opens the modal, they will be first be presented with a list of available integrations to choose connecting to.
Dark mode
You can pass a dark
parameter to the modal to use the dark theme.
Custom logo
Polytomic’s authentication modals can also show your company’s logo instead of Polytomic’s. To turn this on, email an SVG file of your company’s logo to support@polytomic.com
Connect modal initialization
Steps
Request parameters
Code example
Below is an example of both frontend and backend code that authenticates to PostgreSQL using the Polytomic Connect API. Note that the caller does not need any knowledge of the required authentication inputs because that is automatically handled by Polytomic Connect.
Requests should be proxied through a backend server so that the API token can be securely added to all outgoing requests. Demonstrated below are two parts broken up by frontend and backend.