PHPackages                             jhnbrn90/socialite-passport - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. jhnbrn90/socialite-passport

AbandonedArchivedLibrary

jhnbrn90/socialite-passport
===========================

Easy socialite authentication using Laravel passport identity provider.

1.0.5(5y ago)1851313[1 issues](https://github.com/Jhnbrn90/socialite-passport/issues)MITPHPPHP ^7.2

Since Dec 8Pushed 4y ago2 watchersCompare

[ Source](https://github.com/Jhnbrn90/socialite-passport)[ Packagist](https://packagist.org/packages/jhnbrn90/socialite-passport)[ Docs](https://github.com/jhnbrn90/socialite-passport)[ RSS](/packages/jhnbrn90-socialite-passport/feed)WikiDiscussions master Synced yesterday

READMEChangelog (6)Dependencies (6)Versions (7)Used By (0)

Socialite Passport
==================

[](#socialite-passport)

[![Latest Version on Packagist](https://camo.githubusercontent.com/32ff395b635c30856fb720c6001e5aa77ad149393a58406c7840fa38f7334b48/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6a686e62726e39302f736f6369616c6974652d70617373706f72742e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/jhnbrn90/socialite-passport)[![Total Downloads](https://camo.githubusercontent.com/ff797211badf25dc8c4f39712f8799cc8e94fc8ae5a3928dfd517bb90c5db125/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6a686e62726e39302f736f6369616c6974652d70617373706f72742e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/jhnbrn90/socialite-passport)

This package provides an easy way to authenticate users via a central identity provider that uses Laravel Passport.

In other words, allow users to login to "client" apps `app1.example.com` and `app2.example.com` using their account on `auth.example.com` (which uses Laravel passport).

This package is aimed at simplifying the socialite integration in the "client" app, and assumes an existing "ID provider" set-up with [Laravel Passport](https://laravel.com/docs/6.x/passport).

Generalized workflow:

- Create new `OAuth Client` in the "ID provider"
- Configure the `keys`, `redirect url` and `host` in the `.env` file of the "client"
- Configure which `Controller` should be passed the authenticated OAuth `$user` object in the client
- Register or log in the `$user` in the "client".

For more details, see the `Installation` and `Usage` sections below.

Installation
------------

[](#installation)

You can install the package via composer:

```
composer require jhnbrn90/socialite-passport
```

Publish the configuration

```
php artisan vendor:publish --provider="JhnBrn90\SocialitePassport\SocialitePassportServiceProvider" --tag="config"
```

Configure the controller and method which should handle the authenticated user. Furthermore, you can customize the route and route name which should be used to log in users.

```
