docs/self-hosting/auth/next-auth/wechat.mdx
Click here 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.
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 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>