UNPKG

@lobehub/chat

Version:

Lobe Chat - an open-source, high-performance chatbot framework that supports speech synthesis, multimodal, and extensible Function Call plugin system. Supports one-click free deployment of your private ChatGPT/LLM web application.

26 lines (22 loc) 680 B
import { authEnv } from '@/config/auth'; function getTenantId() { return ( process.env.AUTH_MICROSOFT_ENTRA_ID_TENANT_ID ?? process.env.AUTH_AZURE_AD_TENANT_ID ?? authEnv.AZURE_AD_TENANT_ID ); } function getIssuer() { const issuer = process.env.MICROSOFT_ENTRA_ID_ISSUER; if (issuer) { return issuer; } const tenantId = getTenantId(); if (tenantId) { // refs: https://github.com/nextauthjs/next-auth/discussions/9154#discussioncomment-10583104 return `https://login.microsoftonline.com/${tenantId}/v2.0`; } else { return undefined; } } export { getIssuer as getMicrosoftEntraIdIssuer, getTenantId as getMicrosoftEntraIdTenantId };