Lecca.io LogoLecca.io
Connections

Create Key Pair Connection

Use a key pair connection when needing to authenticate with a third party app using a public/private key pair.

We are working on a CLI to make this easier

Create connections folder

Locate the your app folder in the apps directory and add a new connections folder if it doesn't exist already.

your-new-app.key-pair.ts
your-new-app.app.ts

Create connection file

Create a new file within your app's connection folder. For a key pair connection, call it your-new-app.key-pair.ts, replacing your-new-app with your app id (which should match your app file).

Add your own values. We provided mock data to help initialize the process.

import { createKeyPairConnection } from "@lecca-io/toolkit";
 
export const yourNewAppKeyPair = createKeyPairConnection({
  id: "your-new-app_connection_key-pair",
  name: "Key Pair",
  description: "Connect using an a public/private key paird",
});
  1. Name the class: Make sure the class starts with your app class name and ends with <appName>KeyPair

  2. Add an id: your-new-app_connection_key-pair

    • Make sure the id follows the format <app-id>_connection_key-pair
  3. You don't need to modify the name or description.

Add new connection to the app's connections property

your-new-app.app.ts
import { createApp } from "@lecca-io/toolkit";
 
export const yourNewApp = createApp({
  ...
  actions: [],
  triggers: [],
  connections: [yourNewAppKeyPair], 
});

On this page