socialiteproviders/weixin-web
Add WeChat (Weixin) web login to Laravel Socialite with this provider from SocialiteProviders. It implements WeChat Open Platform QR-code OAuth authorization, letting users sign in to your Laravel app by scanning a code, with a simple driver you register in Socialite.
Socialite::driver('weixinweb') call shape, same user-object contract, same callback-handling pattern. It is not appropriate as a general WeChat integration — it does not cover Mini Program login, Official Account (公众号) in-app OAuth, or native mobile SDK flows, all of which use different endpoints and scopes. Scope it explicitly as "desktop/web QR login for the China market."SocialiteWasCalled event listener that binds the driver. Configuration is an App ID / App Secret pair in config/services.php. The real feasibility gate is not code — it is WeChat Open Platform account provisioning: entity verification, app review, and domain/redirect-URI whitelisting are external, multi-week, and owned by a business/legal process, not engineering. A TPM should treat that as the critical path and start it before any sprint is committed.unionid in particular only resolves when the Open Platform account is bound to an Official Account or Mini Program.composer.json actually permit? Does the provider still work against Socialite 5.x without a fork? Are openid/unionid mapping semantics documented for our use case (unionid availability, account binding)? What is the fallback if WeChat changes the QR/authorization endpoint? Is there a maintained fork or an internal patch we'd own? What is our exit cost if we have to reimplement the provider in-house (likely <1 week of engineering)?composer require socialiteproviders/weixin-web, register provider + listener, configure credentials, wire redirect/callback routes, and prove the full round trip against a real WeChat Open Platform test account. If the app already has a Socialite abstraction or an identity-linking table, extend it rather than introducing a parallel auth path — the TPM win here is reusing one auth model across providers.composer why-not. Confirm the Socialite major version in use and test the provider against that version, not whatever the README was written for. Validate on the exact PHP minor and Laravel major in production, and re-check after any framework upgrade — this dependency will not announce its breakage.openid as external key, unionid as cross-app identity if available); (4) staging validation with real WeChat accounts; (5) phased production rollout behind a flag per tenant/region. If a framework or Socialite upgrade is also planned, do the upgrade first and re-validate the provider afterward — never bundle the two..env examples.redirect_uri errors; missing unionid breaking identity-merge logic; expired or rotated App Secret hard-failing all logins; silent profile-field changes affecting onboarding. Mitigations: pin versions, alert on callback error-rate spikes, feature-flag the login path so it can be disabled without a deploy, and keep an email/password or alternate-provider fallback so a WeChat outage is a degraded experience, not an outage.How can I help you explore Laravel packages today?