• Stars
    star
    356
  • Rank 119,446 (Top 3 %)
  • Language
    PHP
  • License
    MIT License
  • Created almost 10 years ago
  • Updated about 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Easily add new or override built-in Laravel Socialite providers

Socialite Providers Manager

Build Status codecov Scrutinizer Code Quality Latest Stable Version Total Downloads Latest Unstable Version License StyleCI SensioLabsInsight

About

A package for Laravel Socialite that allows you to easily add new providers or override current providers.

Benefits

  • You will have access to all of the providers that you load in using the manager.
  • Instantiation is deferred until Socialite is called
  • You can override current providers
  • You can create new providers
  • Lumen usage is easy
  • stateless() can be set to true or false
  • You can override a config dynamically
  • It retrieves environment variables directly from the .env file instead of also having to configure the services array.

Available Providers

Reference

Creating a Handler

Below is an example handler. You need to add this full class name to the listen[] in the EventServiceProvider.

namespace Your\Name\Space;

use SocialiteProviders\Manager\SocialiteWasCalled;

class ProviderNameExtendSocialite
{
    public function handle(SocialiteWasCalled $socialiteWasCalled)
    {
        $socialiteWasCalled->extendSocialite('providername', \Your\Name\Space\Provider::class);
    }
}

Creating a Provider

Overriding a Built-in Provider

You can easily override a built-in laravel/socialite provider by creating a new one with exactly the same name (i.e. 'facebook').

Dynamically Passing a Config

You can dynamically pass a config by using:

$clientId = "secret";
$clientSecret = "secret";
$redirectUrl = "http://yourdomain.com/api/redirect";
$additionalProviderConfig = ['site' => 'meta.stackoverflow.com'];
$config = new \SocialiteProviders\Manager\Config($clientId, $clientSecret, $redirectUrl, $additionalProviderConfig);
return Socialite::with('provider-name')->setConfig($config)->redirect();

You must call this before you run any Socialite methods.

Creating an OAuth1 Server Class

Take a look at the other OAuth1 providers for inspiration.

Getting the Access Token Response Body

Laravel Socialite by default only allows access to the access_token. Which can be accessed via the \Laravel\Socialite\User->token public property. Sometimes you need access to the whole response body which may contain items such as a refresh_token.

To make this possible, the OAuth2 provider class needs to extend \SocialiteProviders\Manager\OAuth2\AbstractProvider and OAuth1 providers need to utilize the \SocialiteProviders\Manager\OAuth1\AbstractProvider and \SocialiteProviders\Manager\OAuth1\Server.

You can access it from the user object like so: $user->accessTokenResponseBody

More Repositories

1

Providers

A Collection of Providers for Laravel Socialite
PHP
437
star
2

Weixin

[READ ONLY] Subtree split of the SocialiteProviders/Weixin Provider (see SocialiteProviders/Providers)
PHP
89
star
3

VKontakte

[READ ONLY] Subtree split of the SocialiteProviders/VKontakte Provider (see SocialiteProviders/Providers)
PHP
84
star
4

Generators

Artisan Generators for OAuth1/OAuth2 Providers
PHP
59
star
5

QQ

[READ ONLY] Subtree split of the SocialiteProviders/QQ Provider (see SocialiteProviders/Providers)
PHP
51
star
6

Apple

[READ ONLY] Subtree split of the SocialiteProviders/Apple Provider (see SocialiteProviders/Providers)
PHP
48
star
7

Laravel-Passport

[READ ONLY] Subtree split of the SocialiteProviders/Laravel-Passport Provider (see SocialiteProviders/Providers)
PHP
47
star
8

Microsoft-Azure

[READ ONLY] Subtree split of the SocialiteProviders/Microsoft-Azure Provider (see SocialiteProviders/Providers)
PHP
42
star
9

socialiteproviders.github.io

DEPRECATED: Moved to Netlify
HTML
41
star
10

Weibo

[READ ONLY] Subtree split of the SocialiteProviders/Weibo Provider (see SocialiteProviders/Providers)
PHP
36
star
11

Instagram

[READ ONLY] Subtree split of the SocialiteProviders/Instagram Provider (see SocialiteProviders/Providers)
PHP
34
star
12

Discord

[READ ONLY] Subtree split of the SocialiteProviders/Discord Provider (see SocialiteProviders/Providers)
PHP
33
star
13

Weixin-Web

[READ ONLY] Subtree split of the SocialiteProviders/Weixin-Web Provider (see SocialiteProviders/Providers)
PHP
31
star
14

Twitter

[READ ONLY] Subtree split of the SocialiteProviders/Twitter Provider (see SocialiteProviders/Providers)
PHP
22
star
15

Microsoft

[READ ONLY] Subtree split of the SocialiteProviders/Microsoft Provider (see SocialiteProviders/Providers)
PHP
20
star
16

Steam

[READ ONLY] Subtree split of the SocialiteProviders/Steam Provider (see SocialiteProviders/Providers)
PHP
18
star
17

Documentation

Source code for the old website. See the `website` repo for new code.
JavaScript
17
star
18

YouTube

[READ ONLY] Subtree split of the SocialiteProviders/YouTube Provider (see SocialiteProviders/Providers)
PHP
16
star
19

Microsoft-Graph

[READ ONLY] Subtree split of the SocialiteProviders/Microsoft-Graph Provider (see SocialiteProviders/Providers)
PHP
15
star
20

Keycloak

[READ ONLY] Subtree split of the SocialiteProviders/Keycloak Provider (see SocialiteProviders/Providers)
PHP
14
star
21

TikTok

[READ ONLY] Subtree split of the SocialiteProviders/TikTok Provider (see SocialiteProviders/Providers)
PHP
14
star
22

Spotify

[READ ONLY] Subtree split of the SocialiteProviders/Spotify Provider (see SocialiteProviders/Providers)
PHP
13
star
23

Line

[READ ONLY] Subtree split of the SocialiteProviders/Line Provider (see SocialiteProviders/Providers)
PHP
13
star
24

LinkedIn

[READ ONLY] Subtree split of the SocialiteProviders/LinkedIn Provider (see SocialiteProviders/Providers)
PHP
12
star
25

GitLab

[READ ONLY] Subtree split of the SocialiteProviders/GitLab Provider (see SocialiteProviders/Providers)
PHP
11
star
26

Slack

[READ ONLY] Subtree split of the SocialiteProviders/Slack Provider (see SocialiteProviders/Providers)
PHP
11
star
27

Google-Plus

[READ ONLY] Subtree split of the SocialiteProviders/Google-Plus Provider (see SocialiteProviders/Providers)
PHP
11
star
28

Yandex

[READ ONLY] Subtree split of the SocialiteProviders/Yandex Provider (see SocialiteProviders/Providers)
PHP
11
star
29

Saml2

[READ ONLY] Subtree split of the SocialiteProviders/Saml2 Provider (see SocialiteProviders/Providers)
PHP
11
star
30

Shopify

[READ ONLY] Subtree split of the SocialiteProviders/Shopify Provider (see SocialiteProviders/Providers)
PHP
10
star
31

Okta

[READ ONLY] Subtree split of the SocialiteProviders/Okta Provider (see SocialiteProviders/Providers)
PHP
9
star
32

Telegram

[READ ONLY] Subtree split of the SocialiteProviders/Telegram Provider (see SocialiteProviders/Providers)
PHP
9
star
33

Kakao

[READ ONLY] Subtree split of the SocialiteProviders/Kakao Provider (see SocialiteProviders/Providers)
PHP
9
star
34

Stripe

[READ ONLY] Subtree split of the SocialiteProviders/Stripe Provider (see SocialiteProviders/Providers)
PHP
8
star
35

GovBR

[READ ONLY] Subtree split of the SocialiteProviders/GovBR Provider (see SocialiteProviders/Providers)
PHP
8
star
36

Reddit

[READ ONLY] Subtree split of the SocialiteProviders/Reddit Provider (see SocialiteProviders/Providers)
PHP
7
star
37

Microsoft-Live

[READ ONLY] Subtree split of the SocialiteProviders/Microsoft-Live Provider (see SocialiteProviders/Providers)
PHP
7
star
38

37Signals

[READ ONLY] Subtree split of the SocialiteProviders/37Signals Provider (see SocialiteProviders/Providers)
PHP
7
star
39

WordPress

[READ ONLY] Subtree split of the SocialiteProviders/WordPress Provider (see SocialiteProviders/Providers)
PHP
6
star
40

website

Website for Socialite Providers
JavaScript
6
star
41

WeChatWeb

[READ ONLY] Subtree split of the SocialiteProviders/WeChatWeb Provider (see SocialiteProviders/Providers)
PHP
6
star
42

Zoho

[READ ONLY] Subtree split of the SocialiteProviders/Zoho Provider (see SocialiteProviders/Providers)
PHP
5
star
43

DigitalOcean

[READ ONLY] Subtree split of the SocialiteProviders/DigitalOcean Provider (see SocialiteProviders/Providers)
PHP
5
star
44

Jira

[READ ONLY] Subtree split of the SocialiteProviders/Jira Provider (see SocialiteProviders/Providers)
PHP
5
star
45

Naver

[READ ONLY] Subtree split of the SocialiteProviders/Naver Provider (see SocialiteProviders/Providers)
PHP
5
star
46

Fitbit

[READ ONLY] Subtree split of the SocialiteProviders/Fitbit Provider (see SocialiteProviders/Providers)
PHP
5
star
47

Strava

[READ ONLY] Subtree split of the SocialiteProviders/Strava Provider (see SocialiteProviders/Providers)
PHP
5
star
48

Dropbox

[READ ONLY] Subtree split of the SocialiteProviders/Dropbox Provider (see SocialiteProviders/Providers)
PHP
5
star
49

Coinbase

[READ ONLY] Subtree split of the SocialiteProviders/Coinbase Provider (see SocialiteProviders/Providers)
PHP
4
star
50

WeChatServiceAccount

[READ ONLY] Subtree split of the SocialiteProviders/WeChatServiceAccount Provider (see SocialiteProviders/Providers)
PHP
4
star
51

SalesForce

[READ ONLY] Subtree split of the SocialiteProviders/SalesForce Provider (see SocialiteProviders/Providers)
PHP
4
star
52

Authentik

[READ ONLY] Subtree split of the SocialiteProviders/Authentik Provider (see SocialiteProviders/Providers)
PHP
4
star
53

SoundCloud

[READ ONLY] Subtree split of the SocialiteProviders/SoundCloud Provider (see SocialiteProviders/Providers)
PHP
4
star
54

MercadoLibre

[READ ONLY] Subtree split of the SocialiteProviders/MercadoLibre Provider (see SocialiteProviders/Providers)
PHP
4
star
55

MercadoPago

[READ ONLY] Subtree split of the SocialiteProviders/MercadoPago Provider (see SocialiteProviders/Providers)
PHP
3
star
56

Asana

[READ ONLY] Subtree split of the SocialiteProviders/Asana Provider (see SocialiteProviders/Providers)
PHP
3
star
57

Gumroad

[READ ONLY] Subtree split of the SocialiteProviders/Gumroad Provider (see SocialiteProviders/Providers)
PHP
3
star
58

Meetup

[READ ONLY] Subtree split of the SocialiteProviders/Meetup Provider (see SocialiteProviders/Providers)
PHP
3
star
59

Yahoo

[READ ONLY] Subtree split of the SocialiteProviders/Yahoo Provider (see SocialiteProviders/Providers)
PHP
3
star
60

GitHub

[READ ONLY] Subtree split of the SocialiteProviders/GitHub Provider (see SocialiteProviders/Providers)
PHP
3
star
61

Xero

[READ ONLY] Subtree split of the SocialiteProviders/Xero Provider (see SocialiteProviders/Providers)
PHP
3
star
62

ClaveUnica

[READ ONLY] Subtree split of the SocialiteProviders/ClaveUnica Provider (see SocialiteProviders/Providers)
PHP
3
star
63

Patreon

[READ ONLY] Subtree split of the SocialiteProviders/Patreon Provider (see SocialiteProviders/Providers)
PHP
3
star
64

PayPal

[READ ONLY] Subtree split of the SocialiteProviders/PayPal Provider (see SocialiteProviders/Providers)
PHP
3
star
65

Auth0

[READ ONLY] Subtree split of the SocialiteProviders/Auth0 Provider (see SocialiteProviders/Providers)
PHP
3
star
66

Disqus

[READ ONLY] Subtree split of the SocialiteProviders/Disqus Provider (see SocialiteProviders/Providers)
PHP
3
star
67

Nextcloud

[READ ONLY] Subtree split of the SocialiteProviders/Nextcloud Provider (see SocialiteProviders/Providers)
PHP
2
star
68

Snapchat

[READ ONLY] Subtree split of the SocialiteProviders/Snapchat Provider (see SocialiteProviders/Providers)
PHP
2
star
69

deviantART

[READ ONLY] Subtree split of the SocialiteProviders/deviantART Provider (see SocialiteProviders/Providers)
PHP
2
star
70

Whmcs

[READ ONLY] Subtree split of the SocialiteProviders/Whmcs Provider (see SocialiteProviders/Providers)
PHP
2
star
71

Facebook

[READ ONLY] Subtree split of the SocialiteProviders/Facebook Provider (see SocialiteProviders/Providers)
PHP
2
star
72

MakerLog

[READ ONLY] Subtree split of the SocialiteProviders/MakerLog Provider (see SocialiteProviders/Providers)
PHP
2
star
73

Podio

[READ ONLY] Subtree split of the SocialiteProviders/Podio Provider (see SocialiteProviders/Providers)
PHP
2
star
74

Orcid

[READ ONLY] Subtree split of the SocialiteProviders/Orcid Provider (see SocialiteProviders/Providers)
PHP
2
star
75

FusionAuth

[READ ONLY] Subtree split of the SocialiteProviders/FusionAuth Provider (see SocialiteProviders/Providers)
PHP
2
star
76

UAEPass

[READ ONLY] Subtree split of the SocialiteProviders/UAEPass Provider (see SocialiteProviders/Providers)
PHP
2
star
77

Battle.net

[READ ONLY] Subtree split of the SocialiteProviders/Battle.net Provider (see SocialiteProviders/Providers)
PHP
2
star
78

GarminConnect

[READ ONLY] Subtree split of the SocialiteProviders/GarminConnect Provider (see SocialiteProviders/Providers)
PHP
2
star
79

Eventbrite

[READ ONLY] Subtree split of the SocialiteProviders/Eventbrite Provider (see SocialiteProviders/Providers)
PHP
2
star
80

Tumblr

[READ ONLY] Subtree split of the SocialiteProviders/Tumblr Provider (see SocialiteProviders/Providers)
PHP
2
star
81

Zoom

[READ ONLY] Subtree split of the SocialiteProviders/Zoom Provider (see SocialiteProviders/Providers)
PHP
2
star
82

Notion

[READ ONLY] Subtree split of the SocialiteProviders/Notion Provider (see SocialiteProviders/Providers)
PHP
2
star
83

Venmo

[READ ONLY] Subtree split of the SocialiteProviders/Venmo Provider (see SocialiteProviders/Providers)
PHP
2
star
84

Bit.ly

[READ ONLY] Subtree split of the SocialiteProviders/Bit.ly Provider (see SocialiteProviders/Providers)
PHP
2
star
85

Vimeo

[READ ONLY] Subtree split of the SocialiteProviders/Vimeo Provider (see SocialiteProviders/Providers)
PHP
2
star
86

Medium

[READ ONLY] Subtree split of the SocialiteProviders/Medium Provider (see SocialiteProviders/Providers)
PHP
2
star
87

Rdio

[READ ONLY] Subtree split of the SocialiteProviders/Rdio Provider (see SocialiteProviders/Providers)
PHP
2
star
88

Douban

[READ ONLY] Subtree split of the SocialiteProviders/Douban Provider (see SocialiteProviders/Providers)
PHP
2
star
89

PayPal-Sandbox

[READ ONLY] Subtree split of the SocialiteProviders/PayPal-Sandbox Provider (see SocialiteProviders/Providers)
PHP
2
star
90

Lichess

[READ ONLY] Subtree split of the SocialiteProviders/Lichess Provider (see SocialiteProviders/Providers)
PHP
2
star
91

Uber

[READ ONLY] Subtree split of the SocialiteProviders/Uber Provider (see SocialiteProviders/Providers)
PHP
1
star
92

Pr0gramm

[READ ONLY] Subtree split of the SocialiteProviders/Pr0gramm Provider (see SocialiteProviders/Providers)
PHP
1
star
93

AzureADB2C

[READ ONLY] Subtree split of the SocialiteProviders/AzureADB2C Provider (see SocialiteProviders/Providers)
PHP
1
star
94

Pinterest

[READ ONLY] Subtree split of the SocialiteProviders/Pinterest Provider (see SocialiteProviders/Providers)
PHP
1
star
95

xREL

[READ ONLY] Subtree split of the SocialiteProviders/xREL Provider (see SocialiteProviders/Providers)
PHP
1
star
96

AngelList

[READ ONLY] Subtree split of the SocialiteProviders/AngelList Provider (see SocialiteProviders/Providers)
PHP
1
star
97

PeeringDB

[READ ONLY] Subtree split of the SocialiteProviders/PeeringDB Provider (see SocialiteProviders/Providers)
PHP
1
star
98

Vercel

[READ ONLY] Subtree split of the SocialiteProviders/Vercel Provider (see SocialiteProviders/Providers)
PHP
1
star
99

Mollie

[READ ONLY] Subtree split of the SocialiteProviders/Mollie Provider (see SocialiteProviders/Providers)
PHP
1
star
100

Dailymile

[READ ONLY] Subtree split of the SocialiteProviders/Dailymile Provider (see SocialiteProviders/Providers)
PHP
1
star