Where Should I Define Authentication Properties for Kendo AI Integration Contribution?

This topic was automatically generated from Slack. You can find the original thread here.

Hi all! I’m currently working on creating an integration contribution for Kendo AI as a component. I’m a little confused on where I need to define auth properties for the app (i.e, what is made available in this.$auth in the serverless functions). Should they be propDefinitions on the top-level .app.mjs file? Or are they communicated outside the codebase, like within the PR message?

Some further context, I need two auth-related values, apiKey and webhookSecret, oauth isn’t supported.

can you clarify this for me?

Certainly! Here’s how authentication properties are defined for Pipedream app integrations, based on your context (creating a Kendo AI integration that needs apiKey and webhookSecret): ### Where to Define Auth Properties Auth properties are defined in the top-level .app.mjs file of your integration. This is where you specify what fields (like apiKey, webhookSecret, etc.) users will be prompted to enter when they connect their account in Pipedream. You do not define these as propDefinitions in component files, nor do you communicate them only in PR messages. They must be declared in the app definition so Pipedream knows what credentials to collect and how to expose them in this.$auth within your components. ### Example: Defining Auth Properties in .app.mjs export default { type: "app", app: "kendo_ai", propDefinitions: { // ... your prop definitions for actions/triggers }, auth: { type: "custom", fields: { apiKey: { type: "string", label: "API Key", description: "Your Kendo AI API Key", }, webhookSecret: { type: "string", label: "Webhook Secret", description: "Your Kendo AI Webhook Secret", }, }, test: { // Optionally, add a test method to verify credentials async run({ $auth, axios }) { // Example test request return await axios({ url: "https://api.kendoai.com/v1/test", headers: { "Authorization": `Bearer ${$auth.apiKey}`, }, }); }, }, }, }; ### How These Are Used - When a user connects their Kendo AI account, Pipedream will prompt them for apiKey and webhookSecret. - In your component code (actions/triggers), you’ll access these as this.kendo_ai.$auth.apiKey and this.kendo_ai.$auth.webhookSecret. ### Summary - Define auth fields in the .app.mjs file under the auth property. - They are not defined as propDefinitions or only in PR messages. - They become available in this.$auth in your serverless functions/components. If you need more details or an example for your specific use case, let me know!