whatisgithub

What is socialite?

laravel/socialite — explained in plain English

Analysis updated 2026-06-26

5,746PHPAudience · developerComplexity · 2/5LicenseSetup · easy

In one sentence

PHP package for Laravel that adds social login buttons (Google, GitHub, Facebook, and more) to your web app in a few lines of code, handling the OAuth handshake automatically.

Mindmap

mindmap
  root((Socialite))
    What It Does
      Social login
      OAuth handling
      Session bridging
    Built-in Providers
      Google Facebook
      GitHub GitLab
      LinkedIn Bitbucket
      Twitter
    Use Cases
      User sign in
      No password signup
      Third party auth
    Tech Stack
      PHP
      Laravel framework
      OAuth protocol
Click or tap to explore — scroll the page freely

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

What do people build with it?

USE CASE 1

Add Sign in with Google or Sign in with GitHub to a Laravel app without writing any OAuth code yourself.

USE CASE 2

Let users authenticate via Facebook or LinkedIn instead of creating a separate password.

USE CASE 3

Extend with community add-ons to support Discord, Apple, Twitter X, or dozens of other platforms beyond the seven built-in providers.

What is it built with?

PHPLaravelOAuth

How does it compare?

laravel/socialitecausefx/organizraudi-1/sqli-labs
Stars5,7465,7495,768
LanguagePHPPHPPHP
Setup difficultyeasymoderatemoderate
Complexity2/53/53/5
Audiencedeveloperops devopsdeveloper

Figures from each repo's GitHub metadata at analysis time.

How do you get it running?

Difficulty · easy Time to first run · 30min

Requires a Laravel app and API credentials (client ID and secret) from each social platform you want to support.

Use freely for any purpose including commercial projects, just keep the copyright notice. (MIT)

So what is it?

Laravel Socialite is a PHP package that adds social login to web applications built with the Laravel framework. If you want users to sign in with their Facebook, Twitter, Google, LinkedIn, GitHub, GitLab, or Bitbucket account instead of a traditional email and password, this package handles the connection work behind the scenes. The problem it solves is that connecting to these external services involves a protocol called OAuth, which requires a specific back-and-forth handshake between your app and the social network. Writing that handshake from scratch is tedious and error-prone. Socialite takes care of it for you, so you can add "Sign in with Google" to your site in a few lines of code rather than hundreds. The package officially supports the seven providers listed above. For other platforms like Twitter X, Apple, Discord, or dozens more, a community website called Socialite Providers maintains separate add-ons you can install alongside it. The README is brief and points to the official Laravel documentation website for full setup instructions. It does not include step-by-step code examples in the README itself, so if you plan to use it you will need to visit the docs. The package is open source under the MIT license, meaning you can use it freely in personal or commercial projects.

Copy-paste prompts

Prompt 1
I am building a Laravel app and want to add Google login using Socialite. Show me the route, controller method, and config I need to get it working.
Prompt 2
Using Laravel Socialite, how do I retrieve a user's email and profile photo after they authenticate via GitHub?
Prompt 3
Show me how to handle the OAuth callback in Laravel Socialite and either create a new user or update an existing one in my database.
Prompt 4
How do I add a provider that is not built into Socialite, like Discord, using the Socialite Providers community packages?

Frequently asked questions

What is socialite?

PHP package for Laravel that adds social login buttons (Google, GitHub, Facebook, and more) to your web app in a few lines of code, handling the OAuth handshake automatically.

What language is socialite written in?

Mainly PHP. The stack also includes PHP, Laravel, OAuth.

What license does socialite use?

Use freely for any purpose including commercial projects, just keep the copyright notice. (MIT)

How hard is socialite to set up?

Setup difficulty is rated easy, with roughly 30min to a first successful run.

Who is socialite for?

Mainly developer.

Open on GitHub → Ask about another repo

This repo across BitVibe Labs

Verify against the repo before relying on details.