Skip to main content

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):
KavachOS will handle the path /api/kavach/auth/oauth/callback/wechat.
2

Configure

lib/kavach.ts

Scopes

Default scopes: snsapi_login
WeChat uses appid and secret rather than the standard client_id / client_secret naming, but KavachOS maps these correctly. The WeChat Open Platform requires ICP filing for mainland China deployments.

Endpoints

Last modified on April 29, 2026