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.
Code example
Below is an example of both frontend and backend code that authenticates to PostgreSQL using the Polytomic Connect API. Note that PostgreSQL can easily be replaced by any other integration; the caller does not need any knowledge of the required authentication inputs because that is automatically handled by Polytomic Connect.
Important: Polytomic Connect requires an API key. If you haven’t already, learn how to obtain an API Key.
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
Frontend
Backend
Note that you can provide Polytomic Connect with a specific list of connections that your user will be able to choose from. Here’s a frontend example that will pop up a modal listing HubSpot, Marketo, Outreach, and Salesforce as connection options: