Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Weixin Web Laravel Package

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.

View on GitHub
Deep Wiki
Context7

[READ ONLY] Subtree split of the SocialiteProviders/Weixin-Web Provider (see SocialiteProviders/Providers)

Frequently asked questions about Weixin Web
How do I install socialiteproviders/weixin-web in a Laravel app?
Install it with Composer using composer require socialiteproviders/weixin-web, then register the package's service provider and the SocialiteWasCalled event listener that binds the weixinweb driver. Typical SocialiteProviders wiring means adding the listener to your EventServiceProvider, then calling Socialite::driver('weixinweb') in your redirect and callback controllers. No custom OAuth code is required because the package implements Socialite's provider contract.
Which Laravel and Socialite versions does this provider support?
The last tagged release is from December 2020, so its composer.json constraints target the Socialite and Laravel majors current at that time. Check the actual constraint set with composer why-not before assuming compatibility with your installed versions. Socialite 5.x changed provider base classes and manager/listener wiring, so a 2020-era provider may need a small patch to work cleanly. Validate on the exact PHP minor and Laravel major you run in production.
How do I configure WeChat App ID and App Secret for this driver?
Add a weixinweb entry in config/services.php with your client_id (the WeChat App ID), client_secret (the App Secret), and redirect URI from the WeChat Open Platform console. The redirect URI must exactly match one that has been whitelisted in the Open Platform account or authorization will fail. Credentials come from a verified Open Platform website application, not from an Official Account or Mini Program.
What is the difference between weixin-web and WeChat Official Account or Mini Program login?
This package only implements WeChat Open Platform QR-code OAuth for desktop and web browsers, where the user scans a code with the WeChat app. It does not cover Mini Program login or in-app browser OAuth inside WeChat, which use different endpoints and scopes. Treat it as a scoped dependency for China-market web login rather than a general WeChat integration.
Why is unionid null when I retrieve the WeChat user?
The unionid is only returned when the Open Platform account is bound to an Official Account or Mini Program under the same entity. Without that binding, you only receive an openid that is app-specific. Profile fields can also be sparse depending on the authorization state and scopes granted. Do not design your identity model around unionid unless you have confirmed the account binding.
Is socialiteproviders/weixin-web still maintained?
It is a low-traffic community package inside the SocialiteProviders monorepo, last released in December 2020 with modest star counts, so treat it as effectively unmaintained. The code surface is small and the Socialite contract is stable, which limits the blast radius. Plan to own a fork or internal patch if you depend on it long term, and re-test after any Laravel or Socialite upgrade.
What do I need from WeChat before I can test this locally?
You need a provisioned WeChat Open Platform website application with a verified entity, an approved app, and your redirect domain whitelisted. That review process is external and often takes multiple weeks, so start it before committing engineering time. Use a real Open Platform test account to prove the full redirect and callback round trip, since the QR flow cannot be meaningfully mocked end to end.
Can I use this package for WeChat login inside the WeChat mobile browser?
No. In-app browser OAuth for Official Accounts uses a different authorization endpoint and scope, and is not handled by this provider. This package is specifically the Open Platform QR-code flow aimed at desktop and standard web browsers. If your roadmap needs in-app or Mini Program auth, those are separate packages and flows that should not be conflated.
How much work is it to replace this provider with my own implementation?
The exit cost is low because the provider is a thin adapter over the standard Socialite contract. A rough estimate is under a week of engineering to reimplement the redirect, callback, and user mapping against WeChat's Open Platform endpoints. Keeping your auth code behind a single Socialite abstraction makes that swap nearly transparent to the rest of the app.
What production risks should I watch for with this WeChat Socialite provider?
Risks stack around Socialite major-version drift, WeChat Open Platform API and error-code changes since 2020, and the lack of an active maintainer. Pin the package, validate transitive constraints with composer why-not, and smoke-test the full QR round trip after every framework upgrade because this dependency will not announce its breakage. Also monitor for endpoint or scope changes from WeChat and keep a fallback path in mind.
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
shitoudev/permissionmanager
johannesclimacus/laravel-tui
hocvt/seotools
vitalybaev/sypexgeo
amphibee/themosis-ignition
gito-me/fast-excel
frankyso/laravel-ipaymu
geolize-studio/laravel-chile
boomerangui/chat
jinas/dhivatar
store-doc/laravel-storage-driver
plus-it/laravel-translation-manager
diephp/perhaps
diephp/telegraph
osmaviation/spreadsheet
microsoft/fluentui-system-icons
mmccook/php-json-canonicalization-scheme
middlewares/firewall
qubiqx/montapacking
nyoncode/laravel-package-console