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

Twitter Laravel Package

socialiteproviders/twitter

Twitter/X OAuth provider for Laravel Socialite. Add Twitter login to your Laravel app with a drop-in driver supporting OAuth 1.0a and OAuth 2.0, letting users sign in with their Twitter accounts quickly and securely via the familiar Socialite API. Simple to install and configure.

View on GitHub
Deep Wiki
Context7

Product Decisions This Supports

  • Feature scoping for social login: This package answers a narrow, well-defined question — "can we add a Sign in with X (Twitter) button to our Laravel app this sprint?" — without committing to a custom OAuth 1.0a implementation. It informs whether social auth via Twitter is a one-day story or a multi-week platform bet.
  • Build vs. buy: A custom Twitter OAuth integration means owning signature generation (OAuth 1.0a HMAC-SHA1), token refresh semantics, callback handling, and failure states. This adapter reduces that to a Composer dependency plus a service-provider registration and event listener — a strong default for teams already on Laravel Socialite.
  • Roadmap prioritization by channel value: Because the integration cost is low, the real decision shifts from "can we build it?" to "is Twitter/X auth worth a slot on the onboarding funnel?" That reframes the debate around user demand and conversion data rather than engineering effort.
  • Account-linking and identity strategy: The package exposes the Twitter user object but does not return an email address. This directly shapes product decisions around account merging, duplicate-account handling, and whether Twitter can serve as a primary identity or only a secondary linked identity.
  • Use cases it unlocks cheaply: "Sign in with X" for a developer/creator audience, vanity login for marketing landing pages, secondary identity linking for existing email-based accounts, and lightweight social proof at signup.
  • Explicit non-goals: It is an authentication adapter, not an X API client. Posting tweets, reading timelines, follower graphs, or analytics are out of scope — those require a separate X API v2 SDK and a paid API tier decision.

When to Consider This Package

Adopt when:

  • The stack is Laravel with laravel/socialite already installed and the team is comfortable with the SocialiteProviders pattern (one package per provider, registered via a listener).
  • The requirement is login/identity only — you need a Twitter user handle, ID, and avatar, and you are comfortable that no email is returned.
  • Twitter/X is a secondary or optional auth path, not the only way in. Blast radius of an outage or breaking change stays small.
  • You accept community maintenance: this is a subtree split of SocialiteProviders/Providers, so version bumps and fixes land upstream first. Verify the release cadence against your Laravel/Socialite major version before committing.
  • Traffic volume is modest, so you are not exposed to X API rate limits or paid-tier costs for the auth handshake.

Look elsewhere when:

  • You need X API v2 capabilities (posting, reading, analytics) — use a dedicated X API SDK alongside, not this package.
  • Your product requires email at signup for onboarding, lifecycle messaging, or CRM sync. Twitter won't supply it; plan a fallback capture step or deprioritize the channel.
  • You need enterprise SLAs, vendor support, or a security review trail — OSS with ~25 stars and a 2023-dated release is not that.
  • You are not on Laravel/Socialite, or you're on a Socialite major version this adapter hasn't been verified against. Budget a spike to confirm compatibility rather than assuming it.
  • You need OAuth 2.0 / PKCE flows specifically. This provider targets Twitter's OAuth 1.0a path; confirm the flow matches your security and UX requirements.
  • Twitter/X auth is the sole onboarding path for a revenue-critical product — the concentration and platform-pricing risk argue for owning that integration or choosing a managed auth vendor.

How to Pitch It (Stakeholders)

For executives: This is a small, free, open-source adapter that lets our Laravel app offer "Sign in with X" in roughly a day of engineering rather than a multi-week build. It carries no license cost and no vendor contract. The trade-offs are bounded: it is community-maintained, and Twitter does not share user emails, so it works best as an optional secondary login rather than our primary identity path. Recommendation: pilot it behind a feature flag on one surface, measure signup conversion lift, and decide on wider rollout from that data.

For engineering: One Composer dependency, a Socialite provider registration, and an event listener — no custom OAuth 1.0a signing code to own. It handles the Twitter handshake only; anything touching the X API (posting, reading, analytics) is a separate integration with separate cost and rate-limit implications. Known caveats to verify before we commit: compatibility with our current Laravel/Socialite versions (last tagged release is mid-2023, and fixes land in the upstream SocialiteProviders/Providers monorepo), the absence of an email claim in the response payload, and the fact that Twitter's OAuth 1.0a path is legacy relative to their OAuth 2.0 offering. Treat it as a thin, replaceable adapter — isolate it behind our own auth interface so swapping providers later is a contained change.

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.
middlewares/firewall
qubiqx/montapacking
nyoncode/laravel-package-console
pnscripts/filament-broadquill-lite
pnscripts/laravel-sentfold-lite
vleap/mx-sdk-laravel-internal
twidpay/utils
htetmyathlaing/scout-elasticsearch-driver
artisan-toolbox/front-awesome
ls/client-assistant
users-au/laravel-client
cgv/localized-resource
noith/settings
kda/laravel-package
kda/filament-dynamic-navigation
bypersoft/signbox
pairus/product-data
fayne/laravel-filament-cms-core
nodisrupt/laravel-agent
sierratecnologia/media-manager