Lecca.io LogoLecca.io
Connections

Create Basic Auth Connection

Use a basic auth connection when needing to authenticate with a third party app using a username and password

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.basic-auth.ts
your-new-app.app.ts

Create connection file

Create a new file within your app's connection folder. For a basic auth connection, call it your-new-app.basic-auth.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 { createBasicAuthConnection } from "@lecca-io/toolkit";
 
export const yourNewAppBasicAuth = createBasicAuthConnection({
  id: "your-new-app_connection_basic-auth",
  name: "Basic Auth",
  description: "Connect using a username and password",
});
  1. Name the class: Make sure the class starts with your app class name and ends with <appName>BasicAuth

  2. Add an id: your-new-app_connection_basic-auth

    • Make sure the id follows the format <app-id>_connection_basic-auth
  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: [yourNewAppBasicAuth], 
});

On this page