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

Laravel Social Tokens Laravel Package

pr4w/laravel-social-tokens

Laravel Social Tokens offers a simple way to store, retrieve, and manage social OAuth access tokens for providers like Facebook, Google, and Twitter, with Eloquent models and easy integration into Laravel applications.

View on GitHub
Deep Wiki
Context7

Technical Evaluation

Architecture fit. Pr4w/Laravel-Social-Tokens is a small, single-purpose Laravel package that persists and manages third-party OAuth credentials (provider, provider user ID, access/refresh token, expiry) against your User model via an Eloquent trait plus a published migration. Architecturally it slots in as a persistence-and-refresh layer beneath Laravel Socialite: Socialite handles the redirect/callback handshake, this package owns the durable token record and the refresh lifecycle. That is a clean separation and does not intrude on application domain logic, which keeps coupling low.

Integration feasibility. Low-to-moderate. Integration is the standard Laravel package path: Composer install, auto-discovered service provider, vendor:publish for config and migration, add the trait to the user model, run migrations. The main real work is not installing the package but wiring your existing Socialite callback to persist tokens and deciding where refresh happens (request path vs. queued job). Expect roughly 1–3 engineer-days for a first integration in a greenfield app, and 3–5 days where an existing social_accounts table must be reconciled or backfilled.

Technical risk. The dominant risk in this release is informational: v3.4.0 ships with nothing but a GitHub compare link. No changelog prose, no migration notes, no deprecation list. From semver alone (minor bump on a 3.x line) we should expect additive, backward-compatible changes, but that is an assumption, not a verified fact. Concretely, the things that bite in this class of package are: a changed migration that collides with an already-published one, a renamed config key, a change to the trait's method signatures, or a shift in how token expiry/nullability is handled. Secondary risks are inherent to the domain — plaintext token storage if encryption is not enabled, and stale refresh tokens silently breaking background jobs.

Key questions.

  • What actually changed between v3.3.0 and v3.4.0? Is there a published migration diff, and does it require a new php artisan migrate?
  • Are any config keys, trait methods, or table columns renamed or removed? Does the package declare a UPGRADING.md?
  • What are the supported PHP and Laravel version bounds for v3.4.0, and does that match our current LTS target?
  • Are tokens encrypted at rest by default, and which cipher/key rotation story applies?
  • Which providers are first-class in the refresh logic (Google, Facebook, Twitter/X, LinkedIn) and how are provider-specific refresh quirks handled?
  • What is the maintainer cadence and bus-factor for this repository?

Integration Approach

Stack fit. Assumes a conventional Laravel application (8/9/10/11 depending on the version constraint) on MySQL/Postgres with Socialite already in use or planned. The package is a natural fit if you already have a users table and per-user social identities; it is a poor fit if you need multi-tenant token isolation or a provider-agnostic identity graph — in that case the package becomes a starting point you fork or wrap.

Migration path. Treat this as a fresh adoption (there is no prior assessment to reconcile). Sequence: pin the exact version in Composer, publish config and migrations into a feature branch, diff the generated migration against any existing social-account tables, and run it against a disposable database first. For existing installations holding tokens elsewhere, write a one-off backfill that maps legacy rows into the package's schema, run it in staging, and verify a real refresh against at least two providers before touching production.

Compatibility. Confirm the package's composer.json constraints against your PHP version and Laravel major before anything else — this is the single most common cause of a failed adoption. Because the changelog is empty, pin 3.4.0 explicitly rather than using a caret range, and re-verify the diff on every subsequent release until the maintainer starts publishing notes. Check that the published migration does not clash with an existing table name, and that any config keys you override still exist in the shipped config file.

Sequencing. (1) Version and compatibility spike, half a day. (2) Install, publish, migrate in a scratch environment. (3) Wire the Socialite callback to persist tokens; add the trait to User. (4) Build the refresh path as a queued job with a scheduler entry, not inline in requests. (5) Observability: log refresh success/failure per provider. (6) Backfill and cut over behind a flag. (7) Decommission legacy token storage.

Operational Impact

Maintenance. Small surface area — one table, one trait, a handful of config values — so ongoing maintenance is mostly dependency hygiene. The real cost is tracking upstream: with release notes this thin, someone must read the commit diff on each bump. Budget a recurring hour per release for that review rather than assuming semver will protect you.

Support. No commercial backing; support is GitHub issues at the maintainer's discretion. That is acceptable for a leaf-level package but should be recorded as a bus-factor risk. Internally, designate one engineer as owner so provider-API drift (Google and Meta both deprecate OAuth endpoints on their own schedule) does not land on whoever happens to be on call.

Scaling. The package itself is not a scaling bottleneck — it is a thin Eloquent wrapper. Scale pressure comes from refresh volume: one refresh per user per token lifetime across every provider. Move refreshes to a queue with rate limiting per provider and jitter on the schedule, otherwise you will produce thundering-herd 429s against provider token endpoints at fixed intervals. Database load is trivial; index (user_id, provider) and enforce uniqueness.

Failure modes. Refresh-token revocation by the provider (user changed password, app consent revoked) — requires a defined re-auth prompt path. Expired-token race conditions when two workers refresh simultaneously — requires a row lock or idempotency guard. Migration collision on upgrade — caught only by staging. Silent decryption failure after an APP_KEY rotation — the loudest and most likely outage, since encrypted columns become unreadable and every token looks corrupt. Missing provider API changes with no changelog to warn you.

Ramp-up. A Laravel-fluent engineer needs roughly half a day to read the source (it is small) and understand the trait/migration/config triad. The harder ramp is domain knowledge: which providers support refresh tokens, which return long-lived tokens, and what the re-consent UX should be. Document that in your own runbook — do not expect it from the package.

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.
elsayed85/laravel-api-exceptions
ouhssini/laravel-demo-mode
daworks/ncloud-outbound-mailer-driver
gp247/cms
ignibyte/aic-gates
nexa-merchant/blog
novasa/laravel-language-center
opencage/geocode
adolfoholzer/parameters
livenetworks/ln-starter
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
cgv/localized-resource