mirror of
https://github.com/lobehub/lobehub.git
synced 2026-09-20 04:56:13 +08:00
191f3fe776
* 📝 docs: fix outdated content across the docs site Audited docs/ against the current codebase and fixed stale content that drifted after major refactors (Clerk/NextAuth → Better Auth, src/server → apps/server, src/{config,envs,locales} → packages/*, model-bank updates). - self-hosting/auth: mark removed NextAuth/Clerk pages with deprecation warnings; fix microsoft/zitadel alias claims and the Logto callback path - environment-variables & advanced: correct wrong defaults (S3_SET_ACL, AI_IMAGE_DEFAULT_IMAGE_NUM, index/proxy URLs), drop non-existent env vars and fictional feature flags, fix OIDC config guidance - development: update refactored paths, Better Auth, .mjs configs, remove the MSW section (msw is not a dependency) - providers & model examples: replace retired model ids with in-bank ones; fix comfyui frontmatter corruption - usage: rename Moderator→Orchestrator, GTD→Task, correct shortcut keys, channel capability tables, Feishu/Lark WebSocket mode - platform/migration: fix dead links, docker service name, npx/npm → bun EN and zh-CN pairs updated together. * 📝 docs: fix Logto callback path and AUTH_SECRET deprecation guidance - Revert Logto/Sealos callback URLs to /api/auth/callback/logto to match the runtime SSO redirectURI override - Narrow legacy auth Callout: AUTH_SECRET remains required for Better Auth; mark NEXT_AUTH_SECRET as deprecated in zh-CN * 📝 docs: refresh agent skills for locales, env, auth, and agentRun paths Align OSS agent guidance with post-refactor layout: - packages/locales/src/default + bun run i18n - packages/env/src for env schemas (@/envs alias) - spa-auth shell + src/routes/auth segments - chat agentRun/transports/hetero instead of aiChat * 📝 docs: document APP_URL as required for Better Auth base URL Self-hosted auth uses appEnv.APP_URL as baseURL, not request-header auto-detection. NEXT_PUBLIC_AUTH_URL remains deprecated. * 📝 docs: note self-host search provider setup for web search Built-in lobe-web-browsing needs no client plugin, but self-hosted servers still require SEARCH_PROVIDERS / SEARXNG_URL (default SearXNG). * 📝 docs: point feature guide welcome UI at AgentHome Opening message/questions on the agent chat page live in src/features/AgentHome, not Onboarding WelcomeMessage.
52 lines
3.4 KiB
Plaintext
52 lines
3.4 KiB
Plaintext
---
|
|
title: Configure Wechat Authentication Service in LobeHub
|
|
description: >-
|
|
Learn how to configure Wechat authentication service in LobeHub, including
|
|
creating a new Wechat App, setting permissions, and environment variables.
|
|
tags:
|
|
- Wechat Authentication
|
|
- Wechat App
|
|
- Environment Variable Configuration
|
|
- Single Sign-On
|
|
- LobeHub
|
|
---
|
|
|
|
# Configure Wechat Authentication Service
|
|
|
|
<Callout type={'warning'}>
|
|
NextAuth (Auth.js) has been fully removed from LobeHub. The `NEXT_AUTH_SSO_PROVIDERS` and `AUTH_URL` variables shown below will now cause the deployment to fail at build/startup. This page is kept for historical reference only — use the [Better Auth provider guides](/docs/self-hosting/auth) and the [NextAuth to Better Auth migration guide](/docs/self-hosting/migration/v2/auth/nextauth-to-betterauth) instead.
|
|
</Callout>
|
|
|
|
## Wechat Configuration Process
|
|
|
|
<Steps>
|
|
### Create a Wechat Application
|
|
|
|
Click [here](https://open.weixin.qq.com/cgi-bin/index) and then click "Management Center", "Website Application", and "Create Website Application" in sequence.
|
|
|
|
Fill in the information as required by the official website prompts and submit for review.
|
|
|
|
After successful creation, click "Application Details" to obtain the AppID and AppSecret.
|
|
|
|
### Configure Environment Variables
|
|
|
|
When deploying LobeHub, you need to configure the following environment variables:
|
|
|
|
| Environment Variable | Type | Description |
|
|
| ------------------------- | -------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
| `AUTH_SECRET` | Required | Key used to encrypt Auth.js session tokens. You can generate the key using the command: `openssl rand -base64 32` |
|
|
| `NEXT_AUTH_SSO_PROVIDERS` | Required | Select the Single Sign-On provider for LobeHub. Use `github` for Github. |
|
|
| `WECHAT_CLIENT_ID` | Required | Client ID from the Wechat website application details page |
|
|
| `WECHAT_CLIENT_SECRET` | Required | Client Secret from the Wechat website application details page |
|
|
| `AUTH_URL` | Required | This URL is used to specify the callback address for Auth.js when performing OAuth authentication. Only set it if the default generated redirect address is incorrect. `https://example.com/api/auth` |
|
|
|
|
<Callout type={'tip'}>
|
|
Go to [📘 Environment Variables](/en/docs/self-hosting/environment-variables/auth#wechat) for more details about related variables.
|
|
</Callout>
|
|
</Steps>
|
|
|
|
<Callout type={'info'}>
|
|
After successful deployment, users will be able to authenticate through the WeChat Open Platform
|
|
and use LobeHub.
|
|
</Callout>
|