socialite-development
Skill184 starsChanged 2 months agoApache-2.0View on GitHub
Manages OAuth social authentication with Laravel Socialite. Activate when adding social login providers; configuring OAuth redirect/callback flows; retrieving authenticated user details; customizing scopes or parameters; setting up community providers; testing with Socialite fakes; or when the user mentions social login, OAuth, Socialite, or third-party authentication.
We split this skill into the rules it gives an agent
8 rules. About 0 are common, 1 is distinctive, and 7 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
Distinctive · estimate
This author's own choices. Worth a look.
7
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 13
Use search-docs for detailed Socialite patterns and documentation (installation, configuration, routing, callbacks, testing, scopes, …
- Distinctive: line 27
Must register via event listener — NOT auto-discovered like built-in providers
- Very specific: line 28
Use search-docs for the registration pattern
- Very specific: line 34
Add the provider's client_id, client_secret, and redirect to config/services.php.
- Very specific: line 59
Use search-docs for complete code examples of each step.
- Very specific: line 63
Use search-docs for usage details on: enablePKCE(), userFromToken($token), userFromTokenAndSecret($token, $secret) (OAuth 1.0), retrieving …
- Very specific: line 74
Every provider needs client_id, client_secret, and redirect in config/services.php.
- Very specific: line 78
Do not pass state, response_type, client_id, redirect_uri, or scope via with() — these are reserved.
≈ “Common” is an estimate: at least 1 in 5 of the 308,232 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Socialite Authentication
Documentation
Use search-docs for detailed Socialite patterns and documentation (installation, configuration, routing, callbacks, testing, scopes, stateless auth).
Available Providers
Built-in: facebook, twitter, twitter-oauth-2, linkedin, linkedin-openid, google, github, gitlab, bitbucket, slack, slack-openid, twitch
Community: 150+ additional providers at socialiteproviders.com. For provider-specific setup, use WebFetch on https://socialiteproviders.com/{provider-name}.
Configuration key in config/services.php must match the driver name exactly — note the hyphenated keys: twitter-oauth-2, linkedin-openid, slack-openid.
Twitter/X: Use twitter-oauth-2 (OAuth 2.0) for new projects. The legacy twitter driver is OAuth 1.0. Driver names remain unchanged despite the platform rebrand.
Community providers differ from built-in providers in the following ways:
- Installed via
composer require socialiteproviders/{name} - Must register via event listener — NOT auto-discovered like built-in providers
- Use
search-docsfor the registration pattern
Adding a Provider
1. Configure the provider
Add the provider's client_id, client_secret, and redirect to config/services.php. The config key must match the driver name exactly.
2. Create redirect and callback routes
Two routes are needed: one that calls Socialite::driver('provider')->redirect() to send the user to the OAuth provider, and one that calls Socialite::driver('provider')->user() to receive the callback and retrieve user details.
3. Authenticate and store the user
In the callback, use updateOrCreate to find or create a user record from the provider's response (id, name, email, token, refreshToken), then call Auth::login().
4. Customize the redirect (optional)
scopes()— merge additional scopes with the provider's defaultssetScopes()— replace all scopes entirelywith()— pass optional parameters (e.g.,['hd' => 'example.com']for Google)asBotUser()— Slack only; generates a bot token (xoxb-) instead of a user token (xoxp-). Must be called before bothredirect()anduser(). Only thetokenproperty will be hydrated on the user object.stateless()— for API/SPA contexts where session state is not maintained
5. Verify
- Config key matches driver name exactly (check the list above for hyphenated names)
client_id,client_secret, andredirectare all present- Redirect URL matches what is registered in the provider's OAuth dashboard
- Callback route handles denied grants (when user declines authorization)
Use search-docs for complete code examples of each step.
Additional Features
Use search-docs for usage details on: enablePKCE(), userFromToken($token), userFromTokenAndSecret($token, $secret) (OAuth 1.0), retrieving user details.
User object: getId(), getName(), getEmail(), getAvatar(), getNickname(), token, refreshToken, expiresIn, approvedScopes
Testing
Socialite provides Socialite::fake() for testing redirects and callbacks. Use search-docs for faking redirects, callback user data, custom token properties, and assertion methods.
Common Pitfalls
- Config key must match driver name exactly — hyphenated drivers need hyphenated keys (
linkedin-openid,slack-openid,twitter-oauth-2). Mismatch silently fails. - Every provider needs
client_id,client_secret, andredirectinconfig/services.php. Missing any one causes cryptic errors. scopes()merges with defaults;setScopes()replaces all scopes entirely.- Missing
stateless()in API/SPA contexts causesInvalidStateException. - Redirect URL in
config/services.phpmust exactly match the provider's OAuth dashboard (including trailing slashes and protocol). - Do not pass
state,response_type,client_id,redirect_uri, orscopeviawith()— these are reserved. - Community providers require event listener registration via
SocialiteWasCalled. user()throws when the user declines authorization. Always handle denied grants.
Other versions9 projects use a version of this.
Word for word · 9
- coollabsio/coolify★ 65k100% same
- relaticle/relaticle★ 1.8k100% same
- Relaticle/relaticle★ 1.8k100% same
- nasirkhan/laravel-starter★ 1.4k100% same
- m3ue/m3u-editor★ 870100% same
- sparkison/m3u-editor★ 870100% same
- trypostit/trypost★ 792100% same
- owlchester/kanka★ 358100% same
- sbarbat/tentaclesauth★ 0100% same
Edited · 0
None found.
Wrote their own version · 0
None found.
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
Used alongsideProjects with it also use ai-sdk-development, medialibrary-development and 3 more.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
m3ueSkillai-sdk-development
TRIGGER when working with ai-sdk which is Laravel official first-party AI SDK. Activate when building, editing AI agents, chatbots, text generation, image generation, audio/TTS, transcription/STT, embeddings, RAG, vector stores, reranking, structured output, streaming, conversation memory, tools, queueing, broadcasting, and provider failover across OpenAI, Anthropic, Gemini, Azure, Groq, xAI, DeepSeek, Mistral, Ollama, ElevenLabs, Cohere, Jina, and VoyageAI. Invoke when the user references ai-sdk, the `Laravel\Ai\` namespace, or this project's AI features — not for Prism PHP or other AI packages used directly.
Also in 5 projects that use this
gdarkoSkillmedialibrary-development
Build and work with spatie/laravel-medialibrary features including associating files with Eloquent models, defining media collections and conversions, generating responsive images, and retrieving media URLs and paths.
Also in 3 projects that use this
gdarkoSkillfortify-development
ACTIVATE when the user works on authentication in Laravel. This includes login, registration, password reset, email verification, two-factor authentication (2FA/TOTP/QR codes/recovery codes), profile updates, password confirmation, or any auth-related routes and controllers. Activate when the user mentions Fortify, auth, authentication, login, register, signup, forgot password, verify email, 2FA, or references app/Actions/Fortify/, CreateNewUser, UpdateUserProfileInformation, FortifyServiceProvider, config/fortify.php, or auth guards. Fortify is the frontend-agnostic authentication backend for Laravel that registers all auth routes and controllers. Also activate when building SPA or headless authentication, customizing login redirects, overriding response contracts like LoginResponse, or configuring login throttling. Do NOT activate for Laravel Passport (OAuth2 API tokens), Socialite (OAuth social login), or non-auth Laravel features.
Also in 4 projects that use this
whisper-moneySkillcashier-stripe-development
Handles Laravel Cashier Stripe integration including subscriptions, webhooks, Stripe Checkout, invoices, charges, refunds, trials, coupons, metered billing, and payment failure handling. Triggered when a user mentions Cashier, Billable, IncompletePayment, stripe_id, newSubscription, Stripe subscriptions, or billing. Also applies when setting up webhooks, handling SCA/3DS payment failures, testing with Stripe test cards, or troubleshooting incomplete subscriptions, CSRF webhook errors, or migration publish issues.
Also in 3 projects that use this
StacklokLabsSkillmcp-development
Guide for developing MCP servers with Python SDK. Use when implementing MCP tools, resources, or prompts.
Also in 5 projects that use this
In this repository33 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- .github/copilot-instructions.mdCopilot instructions
- .cursor/rules/laravel-boost.mdcCursor rule
- configure-nightwatchSkill
- configuring-horizonSkill
- inertia-vue-developmentSkill
- infer-conventionsSkill
- laravel-best-practicesSkill
- pulse-developmentSkill
- tailwindcss-developmentSkill
- testing-best-practicesSkill
- wayfinder-developmentSkill
- configure-nightwatchSkill
- configuring-horizonSkill
- inertia-vue-developmentSkill
- infer-conventionsSkill
- laravel-best-practicesSkill
- pulse-developmentSkill
- socialite-developmentSkill
- tailwindcss-developmentSkill
- testing-best-practicesSkill
- wayfinder-developmentSkill
- configure-nightwatchSkill
- configuring-horizonSkill
- inertia-vue-developmentSkill
- infer-conventionsSkill
- laravel-best-practicesSkill
- pulse-developmentSkill
- socialite-developmentSkill
- tailwindcss-developmentSkill
- testing-best-practicesSkill
- wayfinder-developmentSkill
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
Reviews can't be read right now.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

