socialiteproviders/wechat-service-account
Laravel Socialite provider for WeChat Service Account (公众号) OAuth authentication. Adds WeChat sign-in to your Laravel app for official accounts, handling authorization redirects, access tokens, and user profile retrieval through the SocialiteProviders ecosystem.
openid (per-account) and, when the account is bound to an Open Platform, unionid (cross-property). That distinction drives decisions about account linking, cross-product user profiles, and CRM/marketing tooling. Decide early; retrofitting identity joins is expensive.Consider it when:
unionid requirements yet.Look elsewhere when:
js_code exchange), WeCom, or mobile app WeChat login — those are different flows and different providers.unionid across web + app + mini program; that needs WeChat Open Platform binding and likely a broader integration than this package.For executives: WeChat is how Chinese users log in — without it, our signup funnel leaks badly in that market. This package is a small, focused adapter that plugs WeChat Service Account OAuth into our existing Laravel authentication, so the work is days, not weeks. It just shipped a maintenance release adding PHP 8 support, which clears the biggest technical blocker we had, so it's now installable on a modern-ish stack. The caveat stands: adoption is negligible (4 stars, 0 dependents), the release cadence is one patch after roughly three dormant years, and there's no evidence of Laravel 10/11 or PHP 8.2+ verification. So we should treat it as source code we own, not a vendor we depend on: vendor it, assign one owner, add a smoke test, and budget roughly 2–3 engineering days. That buys us a fast, low-cost test of China demand. If China becomes strategic, we revisit with a properly maintained integration covering Open Platform unionid, Mini Program, and WeCom.
For engineering: It's a Socialite OAuth2 provider — register the driver, add client_id/secret/redirect config, and you get redirect() / user() against WeChat's authorize, token, and userinfo endpoints, matching the existing Socialite contract. Release 4.1.0 adds PHP 8 support, so the install constraint that previously blocked modern runtimes is relaxed — but it targets the PHP 8.0 era, so verify it on your actual PHP 8.2/8.3 and Laravel 10/11 before committing, and expect to patch the composer constraint or the provider itself if it breaks. Remaining risks: WeChat-specific quirks (openid vs unionid, snsapi_base vs snsapi_userinfo scope, callback domain whitelisting), a still-thin dependency/maintenance story, and no upstream tests. Mitigation is unchanged: vendor or fork the provider, add contract tests around the token/user mapping, pin versions, and watch WeChat API changes. Integration effort is genuinely small; the maintenance ownership is the actual cost.
How can I help you explore Laravel packages today?