From 3ac13e4a8869f7a52b028b7786386a408e87f94b Mon Sep 17 00:00:00 2001 From: Dominik Bezic Date: Tue, 2 Dec 2025 15:17:01 +0000 Subject: [PATCH] Fix vercel sample to use auth from env --- nodejs/vercel-sdk/sample-agent/package.json | 1 + nodejs/vercel-sdk/sample-agent/src/index.ts | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/nodejs/vercel-sdk/sample-agent/package.json b/nodejs/vercel-sdk/sample-agent/package.json index 692894d6..525d6330 100644 --- a/nodejs/vercel-sdk/sample-agent/package.json +++ b/nodejs/vercel-sdk/sample-agent/package.json @@ -3,6 +3,7 @@ "version": "2025.11.6", "description": "Sample agent integrating Vercel AI SDK Agents with Microsoft 365 Agents SDK and Microsoft Agent 365 SDK", "main": "src/index.ts", + "type": "commonjs", "scripts": { "start": "node dist/index.js", "dev": "nodemon --watch src/*.ts --exec ts-node src/index.ts", diff --git a/nodejs/vercel-sdk/sample-agent/src/index.ts b/nodejs/vercel-sdk/sample-agent/src/index.ts index 85bd9eff..e3db4218 100644 --- a/nodejs/vercel-sdk/sample-agent/src/index.ts +++ b/nodejs/vercel-sdk/sample-agent/src/index.ts @@ -3,11 +3,11 @@ import { configDotenv } from 'dotenv'; configDotenv(); -import { AuthConfiguration, authorizeJWT, CloudAdapter, Request } from '@microsoft/agents-hosting'; +import { AuthConfiguration, authorizeJWT, CloudAdapter, loadAuthConfigFromEnv, Request } from '@microsoft/agents-hosting'; import express, { Response } from 'express' import { agentApplication } from './agent'; -const authConfig: AuthConfiguration = {}; +const authConfig: AuthConfiguration = loadAuthConfigFromEnv(); const server = express() server.use(express.json())