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

Mailru Laravel Package

socialiteproviders/mailru

Adds Mail.ru OAuth login to Laravel Socialite. This provider lets your Laravel app authenticate users through Mail.ru using a standard Socialite driver, with configuration for client ID, secret, and redirect URI. Install via Composer and register the provider.

View on GitHub
Deep Wiki
Context7

Technical Evaluation

Package: socialiteproviders/mailru — community Laravel Socialite driver adding Mail.ru (VK Group) OAuth 2.0 login. Version under review: 4.1.1 (patch, cut 2022-05-23 against 4.1.0). Repo signals are weak: 0 stars, score 0.42, and the description confirms this is a read-only subtree split of the SocialiteProviders monorepo — no issues, no PRs, no roadmap live here.

Architecture fit. This is a thin adapter, not a framework. It registers a MailruProvider through socialiteproviders/manager, which hooks Laravel's SocialiteWasCalled event and calls Socialite::extend(). The provider maps Mail.ru's authorize/token endpoints plus a userinfo call onto a User object. Fit is high if the application already speaks Socialite (Google, GitHub, VK) — the integration is additive and Socialite::driver('mailru') is uniform with existing call sites. Fit is low if Socialite is not already in the stack: adopting a single community provider as your entry point into Socialite is a much larger architectural bet than the composer line suggests.

Integration feasibility. Straightforward and well-bounded: composer require, register the SocialiteWasCalled listener (closure form in AppServiceProvider::boot()), add a mailru block to config/services.php, register a matching redirect URI in the Mail.ru/VK ID console. No schema changes, no middleware, no workers. A developer with Socialite experience should complete a tested round trip in under a day. The time sink is never the code — it is the console-side app registration and redirect URI byte-matching.

Technical risk. The material risks are structural, not version-specific:

  1. Empty changelog. 4.1.1 carries only a compare link. Read the 4.1.0→4.1.1 diff before rollout; confirm it is Composer/CI/metadata only and does not touch the provider class.
  2. Vendor consolidation. Mail.ru's consumer identity stack has been folded into VK Group / VK ID. The strategic question is whether this provider tracks a live, officially-supported OAuth surface or a legacy endpoint in maintenance mode. This is the largest risk to a multi-year integration and should be resolved before design freeze, not after launch.
  3. Bus factor. Community org, per-provider attention is thin, and this split repo has zero engagement signals. Assume no upstream responsiveness.
  4. No 2022+ release. Last cut is over two years old. That is not automatically disqualifying for a thin adapter, but it means the package has not been exercised against modern Socialite majors.

Key questions for maintainer/vendor.

  • What is in the 4.1.0→4.1.1 diff — Composer only, or provider code?
  • Which Mail.ru endpoints and scopes does the provider target today, and are those still the officially recommended ones versus VK ID?
  • Is there a deprecation or successor path, and what is the supported-lifetime statement?
  • Does the provider surface token refresh and error responses (invalid_grant, revoked access) in a way we can present to users?
  • Does getEmail() reliably return an address, or is phone-only registration a real population in our target market?

Integration Approach

Stack fit. Requires PHP 8.x, Laravel with laravel/socialite, and socialiteproviders/manager. Validate declared constraints against the app's locked Socialite major before committing — Socialite has had breaking contract changes across majors and community drivers lag. If the app runs an older Laravel, expect to pin an earlier provider tag.

Migration path. Greenfield social login is the low-friction case: additive config plus a redirect/callback route pair, no data migration. If Mail.ru is joining an existing provider set, reuse the established OAuth controller/action pattern rather than writing a bespoke callback — uniform Socialite::driver() call sites preserve the ability to swap or drop a provider later. If Mail.ru is replacing a provider, treat identity re-linking as a product decision: existing users keyed on the old provider_user_id need an explicit link/merge story, not a silent updateOrCreate.

Compatibility. The realistic test matrix is {Laravel major} × {Socialite major} × {PHP minor}. Treat 4.1.1 as a low-delta patch: re-run the existing auth smoke test rather than authoring new coverage. Confirm the SocialiteWasCalled listener registers correctly under the app's service-provider discovery settings — this is the most common silent failure and looks identical to a Mail.ru-side outage.

Sequencing. Recommended order for a TPM to schedule:

  1. Vendor validation first — confirm the Mail.ru vs VK ID endpoint story and scope availability. Do this before any code, because a "no" invalidates the work.
  2. Console app registration — client ID/secret, redirect URIs per environment (local, staging, prod).
  3. Dependency spike — install, register listener, prove a round trip in staging.
  4. Identity model decision — separate social_accounts table (provider, provider_user_id, user_id, token fields) versus columns on users. Strongly prefer the separate table; it avoids a migration per future provider and correctly allows one user to link several.
  5. Controller/action + error handling — wrap the callback in try/catch (Throwable) and redirect to login with a flash; an unhandled InvalidStateException is a 500 on a page users hit constantly (back button, expired session, double-click).
  6. Feature flag + rollout — ship behind a flag, enable for staff first.

Scope discipline. Decide the final scope list (email only, typically) before launch. Adding a scope later forces every existing user through re-consent, and adding offline-style access later means previously stored tokens cannot be refreshed. This is a one-way door and belongs in the launch checklist.

Operational Impact

Maintenance. Low ongoing code surface, moderate ongoing attention surface. The package is a thin mapper — it will not generate tickets on its own — but it is community-maintained with no SLA, no recent release, and no visible issue tracker in this split. Plan for the possibility that a future Socialite major breaks it and you fix it (subclass the provider, override mapUserToObject()/getUserByToken(), register under a custom key) rather than waiting upstream. Budget roughly a day per year of proactive upkeep plus one reactive fix per Socialite major.

Support. Two distinct support lanes and they should be owned explicitly:

  • Tier 1/2: users who cannot log in. Nearly all of it resolves to three causes — listener not registered (Driver [mailru] is not supported), config/services.php stale after a cached deploy, or a redirect URI mismatch. Write the runbook for these three and support cost collapses.
  • Vendor: Mail.ru/VK API changes and app registration issues. There is no support contract here; escalation is public documentation only. Name an internal owner.

Scaling. Negligible infrastructure impact — OAuth is a handful of synchronous HTTP calls per login. Two real considerations: (a) Mail.ru access tokens are short-lived, so if you cache them, you need a refresh path or background jobs will fail with confusing 401s far from the login event; (b) outbound calls to Mail.ru sit in the request path of the callback, so add a timeout and treat provider slowness as a login failure with a clean redirect rather than a hung request.

Failure modes to instrument.

  • Driver [mailru] is not supported — listener missing, provider not booted, or key case mismatch with Socialite::driver().
  • Redirect URI mismatch — invalid_request/invalid_grant; also check TrustProxies so Laravel generates https:// behind a load balancer.
  • Cached config serving old credentials — after any .env or services.php change, config:clear locally and redeploy with a fresh config:cache. This looks exactly like a Mail.ru outage and burns hours.
  • Invalid state — expired session, blocked cookies, cross-browser link, or a stateful redirect paired with a stateless callback. Pick one mode per entry point and never mix.
  • Null email — Mail.ru accounts can be phone-only or have restricted visibility. Never key identity on email (updateOrCreate on email will colliding-insert or overwrite); key on provider_user_id, and treat null email as "prompt the user to confirm one" rather than inserting '' into a unique index.
  • Unhandled callback exceptions → 500s during peak login traffic.

Ramp-up / launch readiness. Add to the launch checklist: environment variables set in all environments; redirect URI registered identically (scheme, www vs apex, trailing slash) in every console app; config:cache verified post-deploy; feature flag with a documented rollback (flag off = login button hidden, existing linked accounts unaffected); and debug-level logging of getRaw() during bring-up only — remove before production, it contains personal data.

Dependency governance. Pin the version in composer.json ("socialiteproviders/mailru": "4.1.1") rather than floating, so upgrades are deliberate. Patch releases in this monorepo are dependency-bump noise by design; the compatibility risk is never the patch number, it is a major bump of laravel/socialite or socialiteproviders/manager. Track those two as the real upgrade triggers and review the GitHub diff, not the release title.

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.
diephp/sequences
users-au/socialite-provider
twidpay/twid-logger
mrnewport/laravel-plaid
mrnewport/laravel-repo
mrnewport/laravel-docsign
mrnewport/laravel-stow
mrnewport/laravel-flow
mrnewport/laravel-priceable
mrnewport/laravel-nestedterms
fredmeng/laravel-apidoc-generator
itstructure/laravel-multilingual-tools
pdustdar/elasticsearch
markupai/php-sdk
rlacerda83/lumem-microservice-shipment
uni-method/symfony-lib
tacticmedia/scim-server-bundle
neika-ai/symfony-bundle
mattleads/agent-publishing-bundle
glavweb/framework-bundle