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) 676 B
import Keycloak from 'next-auth/providers/keycloak'; import { CommonProviderConfig } from './sso.config'; const provider = { id: 'keycloak', provider: Keycloak({ ...CommonProviderConfig, // Specify auth scope, at least include 'openid email' authorization: { params: { scope: 'openid email profile' } }, clientId: process.env.AUTH_KEYCLOAK_ID, clientSecret: process.env.AUTH_KEYCLOAK_SECRET, issuer: process.env.AUTH_KEYCLOAK_ISSUER, profile(profile) { return { email: profile.email, id: profile.sub, name: profile.name, providerAccountId: profile.sub, }; }, }), }; export default provider;