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

Socialite Odnoklassniki Laravel Package

jhaoda/socialite-odnoklassniki

Odnoklassniki (OK.ru) OAuth2 provider for Laravel Socialite. Adds OK.ru login to your app, letting users sign in with their Odnoklassniki account and fetch basic profile data through Socialite's familiar, fluent driver API.

View on GitHub
Deep Wiki
Context7

Technical Evaluation

Architecture fit

  • Single-purpose Socialite driver: registers an OdnoklassnikiServiceProvider and extends Socialite's driver resolver via Socialite::extend('odnoklassniki', …). This is the framework-sanctioned extension point, so the package sits outside the core auth path and cannot destabilize existing auth flows.
  • Footprint is small — one provider class plus a service provider, auto-discovered. No migrations, no config publishing requirements beyond a services entry, no queue/event/listener surface, no middleware replacement.
  • Clean composition: application code calls Socialite::driver('odnoklassniki') exactly as with GitHub/Google, so it is interchangeable behind our own SocialAuthProvider interface if we choose to abstract it.
  • Does not touch session, password, or token storage internals — session handling and state CSRF remain Socialite's responsibility, which is a positive.

Integration feasibility

  • Low friction if Socialite is already in the stack: composer require + config/services.php entry (client_id, client_secret, redirect, plus OK's application_key/application_secret for signed API calls) + one route pair. Realistically a 1–2 day spike including real-credential verification.
  • Medium friction if this would be our first Socialite provider: we'd be adopting a dependency we don't otherwise need, and the driver's quirks become our first impression of the abstraction.
  • Odnoklassniki's OAuth2 is not textbook OAuth2: token exchange and API calls require an application_key and an MD5 request signature (sig) derived from sorted params plus the application secret. This custom signing logic is the genuinely non-trivial part of the package and the part most likely to break — it is also the main reason not to hand-roll.
  • Email retrieval is unreliable: OK frequently returns no verified email, so we must confirm the driver's field mapping and design an account-linking/verification fallback rather than assuming email-keyed user creation.

Technical risk

  • Staleness is the headline risk. Last release 2021-03-19 — roughly four years without a tag. Laravel 10/11/12 and PHP 8.2/8.3 compatibility is unverified; the illuminate/support and socialite constraints are likely to conflict, and Composer will refuse to install rather than fail silently.
  • Bus factor 1 with 41 stars. No evidence of a second maintainer, CI matrix, or recent issue triage. Upstream will not absorb our fixes. Assume we fork or vendor.
  • License (MIT) is permissive — forking, patching, and internal redistribution are all clean. This substantially de-risks the staleness finding.
  • Protocol-level fragility: pinned to OK's legacy sig scheme (MD5 is mandated by the provider, not chosen by us — document this so it isn't flagged in a security review), plus hardcoded endpoints that will silently rot if OK migrates.
  • Vendor/compliance exposure: OK is part of VK. Depending on our jurisdiction, that carries sanctions, KYC, and data-transfer implications (Russian 152-FZ localization). This is a legal review item, not an engineering one, and it should gate the decision before the code spike.
  • Product risk: the package only creates value if RU/CIS acquisition is a real, funded roadmap item. A 41-star driver with no release in four years signals that almost nobody is running this in production.

Key questions

  1. Which Laravel and PHP versions must we support, and does the current constraint set actually install on them? (Verify with composer why-not, not documentation.)
  2. Is Odnoklassniki a validated market requirement with an owner and a target date, or an opportunistic "add more providers" backlog item?
  3. Has Legal/Compliance cleared VK-owned identity providers for our user base and data-residency obligations?
  4. Does the driver handle token refresh, token expiry, and OK's signature for authenticated API calls (not just the token exchange)?
  5. What is our fallback identity key when OK returns no email?
  6. Build vs. fork vs. buy: is a maintained fork cheaper than a ~200–300 LOC in-house driver we fully control?

Integration Approach

Stack fit

  • Assumes Laravel with laravel/socialite already installed and at least one provider in production. If Socialite is absent, the calculus changes: we'd be adding a framework-level dependency to serve one low-volume provider.
  • Config surface is small and additive: config/services.php → odnoklassniki block, two routes (redirect, callback), one controller action. No changes to config/auth.php, guards, or the users table are required beyond a nullable odnoklassniki_id (or a social_identities table if we already support multiple providers).
  • Secrets must land in the secret manager (OK needs both the OAuth client secret and the application secret for signatures) — do not let this default into .env examples copied around.

Migration path

  • Greenfield add: composer require → service provider auto-discovery → config → routes → staging verification with a real OK application registered in the OK developer console. Note the console and docs are Russian-language; budget for that.
  • If Composer constraints fail (likely on current Laravel): fork under our org, relax composer.json constraints, run the existing suite, and add a matrix job. The code volume is small enough that a fork is hours, not weeks — but it converts a dependency into an owned artifact, which needs an explicit owner.
  • Abstraction layer: wrap the driver behind an internal SocialIdentityProvider contract from day one. This costs ~half a day and makes the eventual swap to an in-house or alternative implementation a one-class change instead of a blast radius.
  • Explicit non-goal: do not migrate existing GitHub/Google flows onto this driver. It is additive only.

Compatibility

  • Pin an exact version and validate against the oldest and newest Laravel we support in CI. Absent a maintained release train, treat every Composer update as a change requiring a smoke test of the full redirect→callback→token→profile path.
  • Verify behavior on PHP 8.2+ specifically — implicit nullable parameters and dynamic properties are common breakages in code of this vintage and may produce deprecations that fail strict CI.
  • Confirm the callback URL registered in the OK console matches staging and production exactly (including trailing slash and scheme); mismatch is the single most common integration failure for this provider.

Sequencing

  1. Gate (week 0): Legal/Compliance sign-off on VK-owned provider + product confirmation of RU/CIS demand. Kill the initiative here if either is negative.
  2. Spike (1–2 days): install on a throwaway branch at our current Laravel/PHP, stand up real OK credentials, prove the full flow in staging. Output is a go/no-go on the upstream package.
  3. Decision point: adopt as-is (only if it installs cleanly) vs. fork-and-own vs. in-house driver. Record the owner either way.
  4. Implement: abstraction interface, config, routes, identity linking, email-absent fallback, feature flag defaulting off.
  5. Harden: failure-path tests (denied consent, expired code, signature mismatch, missing email), rate-limit and timeout handling on the profile call.
  6. Roll out: flag on for internal users → small cohort → full, with a dashboard on callback success rate by provider before general availability.

Operational Impact

Maintenance

  • Effectively unmaintained upstream. Budget for a permanent fork or vendored copy plus a named owner and a quarterly review. This is the dominant lifecycle cost and it is not large in absolute terms (small codebase) but it is permanent — it does not amortize to zero.
  • Expect Dependabot/security-scanner noise from transitive constraints that no upstream release will resolve. Suppress with a documented, reviewed allowlist rather than silently ignoring.
  • Any change to OK's API, signature scheme, or scopes becomes our incident with no vendor to escalate to. Monitor the OK developer changelog (Russian) as a standing task, or accept detection-by-outage.
  • Pin the version; disable automatic minor/patch bumps for this package specifically.

Support

  • No commercial support, no SLA, no maintainer responsiveness guarantee. Internal support burden falls on whichever engineer owns the fork.
  • Documentation is thin and partly Russian-language; troubleshooting knowledge will be tribal. Mitigate with a short internal runbook: how to rotate the two secrets, how to reproduce signature failures, how to read OK's error codes.
  • Support tickets will concentrate on a small, identifiable user segment — worth a documented FAQ rather than per-ticket engineering.

Scaling

  • Runtime cost is negligible: two HTTP round-trips per login, no background jobs, no storage growth beyond an identity row. This will never be a capacity concern.
  • The real limit is OK's API rate limits and network latency from our region to OK's endpoints. Set explicit HTTP timeouts (5–10s) and avoid calling the profile endpoint more than once per login.
  • Login volume will be a small fraction of total auth. Do not size anything on this provider; do ensure a slow/failing OK endpoint cannot exhaust PHP-FPM workers — that's the only realistic scaling failure mode.

Failure modes

  • Silent install failure on upgrade: a Laravel/PHP bump breaks the package constraint and deployment fails at build time — visible, low harm, but blocks unrelated releases if not caught in CI. Pin and test.
  • Signature mismatch after credential rotation: rotating only one of the two secrets produces opaque 4xx errors from OK. Rotation must be a documented, paired procedure.
  • Missing email on profile: account creation fails or creates unverified duplicates. Requires an explicit fallback (prompt for email + verify, or link-only to existing accounts).
  • User denies consent / revokes access: Socialite throws on the callback; must be caught and rendered as a friendly cancellation, not a 500.
  • Provider-side outage or regional blocking: OK becoming unreachable from our infrastructure yields hanging requests unless timeouts are set. Login must degrade gracefully — the account/password path must stay fully functional and unaffected.
  • Endpoint migration: OK changes a URL; every login fails immediately and loudly. No graceful degradation is possible; the mitigation is a fast rollback (flag off) and an alert on callback success rate.
  • Compliance change: sanctions or data-localization rules shift and the provider must be removed under time pressure. The abstraction layer and feature flag exist precisely to make this a config change, not a refactor.

Ramp-up

  • For a team fluent in Laravel/Socialite: roughly half a day to first working login, 1–2 days to production-hardened. The learning is 90% OK-specific (signature scheme, developer console, missing-email behavior), not package-specific.
  • For a team without Socialite experience: add 2–3 days, mostly OAuth2 callback/state handling — though Socialite absorbs most of that.
  • Knowledge concentration risk is the real ramp-up issue: with 41 stars and no upstream activity, there is no community corpus to learn from. Everything the team knows must be written down internally on day one, alongside the fork.
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.
oxygen/auth
relicsoftware/barakah-payment-gateway
tobya/work-with-composer
equipc/laravel-email-validator
equipc/laravel-email-database-log
adedsec/nova-translated-labels
wazza/laravel-db-encryption
hokny/laravel-generator
vonsogt/backup
jengo/queues
jeremykenedy/laravel-observability
coleus/frame
thtg88/journalism
filagora/filagora-ai-forums
rlacerda83/query-parser
socialdept/atp-orm
cboxdk/laravel-assistant-client
socialdept/atp-resolver
socialdept/tenant-domains
tautvydasr/blade-class-names