Authenticate users with WeChat via the oauth plugin. Covers Open Platform registration, callback domain config, and snsapi_login and snsapi_userinfo scopes.
Setup
1
Get credentials
Go to the WeChat Open Platform and register a website app. Set the authorization callback domain (not a full URL, just the domain):
your-app.com
theAuth will handle the path /api/theauth/auth/oauth/callback/wechat.
WeChat uses appid and secret rather than the standard client_id / client_secret naming, but theAuth maps these correctly. The WeChat Open Platform requires ICP filing for mainland China deployments.
This is a preset built on the generic OIDC factory, which reads the user from https://api.weixin.qq.com/sns/userinfo and requires the response to contain the OIDC sub and email fields. That endpoint returns an openid field and no email, so sign-in is expected to fail with WeChat userinfo response missing required "sub" field. This preset has not been verified against the live service.