WeChat OAuth
Add WeChat as an OAuth provider for PC (QR code) or mobile (WeChat in-app browser) sign-in.
Get credentials
- Register at the WeChat Open Platform.
- After your app is approved, you receive App ID and App Secret.

SubTypes
When configuring the WeChat provider, choose a SubType:
| SubType | Use case |
|---|---|
| Web (default) | PC browser: user scans QR code with WeChat app to sign in. |
| Mobile | WeChat built-in browser: OAuth inside the WeChat app. |
Use the same credentials; endpoints differ. For both PC and mobile, create two WeChat providers (one Web, one Mobile).
Two keypairs (optional)
- Client ID / Client Secret — From WeChat Open Platform (微信开放平台) for PC QR-code login.
- Client ID 2 / Client Secret 2 + Access Token — From WeChat Media Platform (微信公众平台) for in-WeChat-app login. Access Token is the value you set in the WeChat public account’s server configuration. WeChat only allows in-app login from the WeChat browser, not from other mobile browsers or apps.
If you set both keypairs and Access Token, enable Enable QR code: on PC, users can sign in with the Open Platform QR code or be prompted to follow the official account and then scan the Open Platform QR code. This flow is for PC only (mobile cannot scan its own QR code).
Enable WeChat on the login page
Add the WeChat provider to your application and add WeChat to Signin methods. The login page will show a WeChat tab. QR code flow:
- User selects the WeChat tab; a QR code is shown.
- User scans with the WeChat app and authorizes.
- Use Refresh below the QR code if it expires.

Link your WeChat Open Platform and WeChat Media Platform accounts in the Open Platform so the same user is recognized when signing in from PC and from the WeChat app.
WeChat does not support sign-in from third-party mobile apps or from mobile browsers outside the WeChat app. In-app login must happen inside WeChat.