socialiteproviders/weibo
Weibo OAuth provider for Laravel Socialite. Add Weibo login to your Laravel app with a lightweight Socialite driver, Composer installation, and standard OAuth flow configuration. Supports user authentication and profile retrieval via Weibo.
Architecture fit: socialiteproviders/weibo is a thin, single-purpose OAuth 2.0 driver that extends Laravel\Socialite\Two\AbstractProvider and registers itself through the SocialiteProviders\Manager event listener. It slots into the standard Laravel Socialite extension pattern, meaning it inherits Socialite's contract (redirect, callback, user) and adds only Weibo-specific endpoint wiring, scope handling, and user mapping. There is no new architectural surface: no service container additions beyond the manager registration, no persistence layer, no middleware. Architecturally this is about as low-risk as a third-party package gets — it's an adapter, not a framework.
Integration feasibility: High. A typical integration is a composer require, a SocialiteWasCalled listener registration in EventServiceProvider, a services.weibo config block, and three env vars (WEIBO_CLIENT_ID, WEIBO_CLIENT_SECRET, WEIBO_REDIRECT_URI). The package itself is a subtree split of the SocialiteProviders/Providers monorepo (read-only, no issues/PRs accepted here), so any bug fix or enhancement must go upstream to the monorepo. The Weibo user payload differs from Western providers (id vs uid, localized fields, screen_name), so the returned Socialite User object will need explicit normalization on our side.
Technical risk: The dominant risk is staleness. Last tagged release is December 2020, which predates Laravel 9/10/11, PHP 8.1+, and several Socialite major versions. We should assume the composer constraints in the released tag will conflict with a modern Laravel app and that we'll need to either loosen constraints, pull from the monorepo's dev branch, or vendor a fork. Secondary risks: Weibo's OAuth endpoints and app-permission review process have changed over time; the driver's assumption about scopes and the users/show response shape may need verification against current Weibo Open Platform docs. Low star count (34) and score (0.35) confirm this is a low-visibility community artifact with no meaningful review depth.
Key questions to resolve before commitment:
composer.json constraints resolve cleanly?Stack fit: The package is only viable inside a Laravel application already using laravel/socialite (v5.x). It does not help standalone Symfony, Node, or Go services. If our auth is centralized outside Laravel (e.g., a separate IdP), this package is the wrong seam — we would integrate Weibo OAuth directly at the IdP and let Laravel consume our own tokens instead.
Migration path: Treat this as a greenfield add, not a migration. Steps: (1) confirm Socialite is installed and the SocialiteProviders\Manager package is present; (2) fork or pin the package at the monorepo's current commit if the 2020 tag conflicts with our framework versions; (3) register the SocialiteWasCalled listener; (4) add the services.weibo block and env vars; (5) build the callback route with account-linking logic (link Weibo identity to an existing user, or create a shadow user with no email — Weibo will not reliably return an email).
Compatibility: Expect friction. Verify illuminate/support and socialite version constraints against our lockfile. If the tag doesn't resolve, composer will push us toward dev-master from the monorepo — acceptable only with a commit SHA pin and a documented rationale. PHP 8.x deprecation warnings in inherited Socialite code should be checked in CI.
Sequencing:
user() mapping.Maintenance: This is the weak point. The subtree split is read-only and effectively dormant since 2020; the health of the driver depends entirely on the upstream monorepo. Budget for a quarterly review: check that the monorepo still supports the current Socialite/Laravel majors, and be prepared to carry a small internal patch (likely just constraint loosening). Assign a named owner — an unowned OAuth driver is a silent liability.
Support: Community-only, no SLA, no vendor. Internal runbook should document the Weibo Open Platform console access, the app credentials rotation procedure, and the exact package version/commit pinned. On-call should know that a Weibo outage manifests as callback failures, not as application errors we can fix.
Scaling: Negligible. OAuth code runs per-login, is stateless, and adds microseconds to the request path. The only scaling-shaped concern is the Weibo API's own rate limits on users/show; cache the profile at link time and avoid per-request lookups.
Failure modes to design for:
user() mapping throws; wrap in try/catch and log the raw payload.Ramp-up: Low for a Laravel engineer — roughly half a day to read the driver, half a day to wire the flow, and the remainder spent on account-linking edge cases (no-email users, duplicate identities) and Weibo console setup. The real ramp-up cost is not the code but the external dependency: obtaining and reviewing a Weibo developer app and getting the callback domain whitelisted can dominate the timeline and should be started in parallel on day one.
How can I help you explore Laravel packages today?