Skip to content
Automatically manage user persistence and resolution for any Laravel Socialite provider.
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.
.github Added initial functionality. Oct 14, 2019
database/migrations Added initial functionality. Oct 14, 2019
src Added driver method. Oct 14, 2019
.gitignore Added initial functionality. Oct 14, 2019 Updated documentation. Oct 14, 2019 Added initial functionality. Oct 14, 2019 Added initial functionality. Oct 14, 2019
LICENSE Added initial functionality. Oct 14, 2019 Update Oct 14, 2019

Socialiter for Laravel


Supporting This Package

This is an MIT-licensed open source project with its ongoing development made possible by the support of the community. If you'd like to support this, and our other packages, please consider sponsoring us via the button above.

Table of Contents


  • PHP 7.2+
  • Laravel 6.2+
  • Socialite 4.2+


  1. Install the composer package:

    composer require genealabs/laravel-socialiter
  2. Add the social credentials table:

    php artisan migrate

    To prevent automatic migrations from running (for example if you have a different migration setup, like multi-tenancy, etc.), add the following entry to your app's service provider:

    namespace App\Providers;
    use GeneaLabs\LaravelSocialiter\Socialiter;
    use Illuminate\Support\ServiceProvider;
    class AppServiceProvider extends ServiceProvider
        public function register()
        public function boot()

    And then publish the migration files and manipulate them as needed:

    pa vendor:publish --provider="GeneaLabs\LaravelSocialiter\Providers\ServiceProvider" --tag=migrations


The following is an example controller implementation using the "Sign in with Apple" driver:


namespace App\Http\Controllers\Auth;

use App\Http\Controllers\Controller;
use GeneaLabs\LaravelSocialiter\Socialiter;
use Illuminate\Http\RedirectResponse;
use Laravel\Socialite\Facades\Socialite;

class SignInWithAppleController extends Controller
    public function redirectToProvider() : RedirectResponse
        // use Socialite, as before
        return Socialite::driver("sign-in-with-apple")
            ->scopes(["name", "email"])

    public function handleProviderCallback()
        // but handle the callback using Socialiter
        $user = (new Socialiter)

        // or you can use the facade:
        $user = Socialiter::driver("sign-in-with-apple")

        // or you can use the app binding:
        $user = app("socialiter")

Commitment to Quality

During package development I try as best as possible to embrace good design and development practices, to help ensure that this package is as good as it can be. My checklist for package development includes:

  • Achieve as close to 100% code coverage as possible using unit tests.
  • Eliminate any issues identified by SensioLabs Insight and Scrutinizer.
  • Be fully PSR1, PSR2, and PSR4 compliant.
  • Include comprehensive documentation in
  • Provide an up-to-date which adheres to the format outlined at
  • Have no PHPMD or PHPCS warnings throughout all code.


Please observe and respect all aspects of the included Code of Conduct.

Reporting Issues

When reporting issues, please fill out the included template as completely as possible. Incomplete issues may be ignored or closed if there is not enough information included to be actionable.

Submitting Pull Requests

Please review the Contribution Guidelines. Only PRs that meet all criterium will be accepted.

If you ❤️ open-source software, give the repos you use a ⭐️.

We have included the awesome symfony/thanks composer package as a dev dependency. Let your OS package maintainers know you appreciate them by starring the packages you use. Simply run composer thanks after installing this package. (And not to worry, since it's a dev-dependency it won't be installed in your live environment.)

You can’t perform that action at this time.