A Collection of Providers for Laravel Socialite

Overview

A Collection of Providers for Laravel Socialite

Documentation

Full documentation for using these providers can be found at the Documentation.

Contribute

Submit Pull Requests here for new providers. See the docs for more information.

Comments
  • Twitter Stateless Session store not set on request.

    Twitter Stateless Session store not set on request.

    I'm trying to implement stateless redirecting to twitter from my Lumen app, but every time it gives an error saying: Session store not set on request.

    I followed all the installation instructions of the Twitter provider correctly.

    Although the provider should automatically detect I want stateless, I extra noted it in the call: return Socialite::driver('twitter')->stateless()->redirect();

    Do you guys have an idea what might be wrong?

    opened by jefvanhoyweghen 29
  • Azure B2C support

    Azure B2C support

    Guys,

    Which plugin will work with Azure B2C? Looking at providers here all seem to use the URLs from Azure AD, but don't seem to work with AD B2C...

    Anyone had a look at this before?

    question provider suggestion 
    opened by hugeps 20
  • split.sh seems not run

    split.sh seems not run

    new provider had been added to build/split.sh by PR https://github.com/SocialiteProviders/Providers/pull/302

    but new repo have not been auto created. 404: https://github.com/SocialiteProviders/WeChatServiceAccount

    help wanted 
    opened by sinkcup 18
  • Create a provider for Sign In with Apple

    Create a provider for Sign In with Apple

    This starts to add Sign In with Apple support, and is based off of Aaron Parecki's blog on Okta.

    I haven't been able to add the getUserByToken or mapUserToObject methods yet unfortunately as I can't find an API endpoint for this. 🤔

    I thought it may be worth adding this PR and if anyone finds an endpoint for user data, this can be updated.

    If it's better to just close this because of the lack of those methods, feel free to do so.

    opened by owenvoke 17
  • Added Instagram Basic API

    Added Instagram Basic API

    Since Instagram is changing the API, I needed to change some things. The tutorial is found here: https://developers.facebook.com/docs/instagram-basic-display-api

    I tested it on my server and it worked:

    1. Installation:
        // it's not added to packagist, someone needs to do it I guess? 
        //However, in future it's going to be:
        composer require socialiteproviders/instagram-basic
    
    1. For the listener:

       'SocialiteProviders\Manager\SocialiteWasCalled' => [
           'SocialiteProviders\InstagramBasic\InstagramBasicExtendSocialite@handle',
       ],
      
    2. Configuration setup

        'instagrambasic' => [
            'client_id' => env('INSTAGRAM_BASIC_KEY'),
            'client_secret' => env('INSTAGRAM_BASIC_SECRET'),
            'redirect' => env('INSTAGRAM_BASIC_REDIRECT'),
        ],
    
    1. Usage

    return Socialite::with('Instagrambasic')->redirect();

    new provider approved 
    opened by pmochine 15
  • Provider class modified for Azure v2 API compatibility

    Provider class modified for Azure v2 API compatibility

    Hi team, MS Azure , provider class modified for API v2 compatibility. Added scope param (mandatory in v2 api) Added optional proxy configuration. Added logout url from Azure AD. bye

    opened by alessandrofuda 14
  • PR #901 Breaks Existing SAML2 Installations

    PR #901 Breaks Existing SAML2 Installations

    Using the Saml2 provider, v4.3.0 works fine, v4.4.0 breaks (some?) existing installations.

    @27pchrisl

    Invalid argument supplied for foreach() {"exception":"[object] (ErrorException(code: 0): Invalid argument supplied for foreach() at /opt/
    librenms/vendor/litesaml/lightsaml/src/LightSaml/Model/Metadata/SpSsoDescriptor.php:110)"}
    
    opened by washcroft 10
  • Fixed Flickr doesn't recognise the permission set

    Fixed Flickr doesn't recognise the permission set

    Currently when using Flickr it will result in the error: "Oops! Flickr doesn't recognise the permission set." - The authorize URL must have perms specified on it:

    https://www.flickr.com/groups/51035612836@N01/discuss/72157692896948105/

    Docs are here:

    https://www.flickr.com/services/api/auth.oauth.html

    I have verified that once this is added everything works correctly again.

    opened by brianwozeniak 10
  • OpenID Connect Possible with Socialite Providers?

    OpenID Connect Possible with Socialite Providers?

    Good afternoon,

    I spent a bit of time this weekend trying my hand at creating my own Socialite Provider to try and integrate with the SSO software we utilize at a number of community colleges here in California (the software is from a company from the East coast however and is named PortalGuard).

    PortalGuard supports multiple SSO protocols: CAS, SAML 2.0, and also OpenID Connect.

    As I have been trying to wrap my head around what to utilize for my projects moving forward, I started reading up on Socialite and thought it might be worth a try experimenting with creating my own provider for PortalGuard (since after reviewing the other providers it seemed like everything in place with PortalGuard's OpenID Connect support should allow me to get things working...especially since a few months ago I was able to get the open source Kanboard project authenticating with its OAuth2 Provider and PortalGuard).

    The main error I've been receiving has been the following one on my end:

    Client error: `POST https://idp.example.com/oauth/v2/token` resulted in a `400 Bad Request` response: Bad Request
    

    If I try with the stateless option instead it resulted in a different error, but the stateful approach seemed to be the better overall option.

    I wasn't able to get it up and running though and wasn't sure exactly where the problem was.

    As far as OpenID Connect goes, there's an older Laravel piece that seems like it might use Socialite a bit (last update is from 2017 however and the repo is archived currently): https://github.com/furdarius/oidconnect-laravel

    There's a different OpenID type client here that's had more recent updates (but doesn't seem to target OpenID Connect specifically): https://github.com/univicosa/laravel-openid-client

    There's a general PHP OpenID Connect Library available here that's also had recent updates (I experimented with this one a little bit, but it wasn't an option I wasn't able to get quickly up and running either): https://github.com/jumbojett/OpenID-Connect-PHP

    At the moment, for SSO the protocol I've had the most success with has been CAS (via https://github.com/subfission/cas) but an option utilizing Socialite underneath the hood seemed like it might be a little more future proof / integrated into the normal Laravel capabilities, but that's a completely different protocol so wouldn't be something I could use with Socialite.

    Any thoughts on whether an Identity Provider (PortalGuard in this case) that supports OpenID Connect can be used with Socialite correctly if a Provider is created for it? (At the moment I'm under the assumption that there's something wrong with the Provider class I put together, but since debugging details were slim it was difficult to say for sure).

    Any thoughts on being able to troubleshoot the new Provider more effectively? (I do have a bit of insight into the requests in the PortalGuard logs on that end and share the following additional info).

    Following the Socialite instructions, I added the following two routes on my end:

    Route::get('/auth/redirect', function () {
        //return Socialite::driver('portalguard')->stateless()->redirect();
        return Socialite::driver('portalguard')->redirect();
    });
    
    Route::get('/auth/callback', function () {
        $user = Socialite::driver('portalguard')->stateless()->user();
        //$user = Socialite::driver('portalguard')->user();
        // $user->token
    });
    

    Primarily, I've been attempting to access the /auth/callback endpoint which I'm assuming should trigger a login flow on its own, but I never get to the PortalGuard login page. However, it does mark down some items in its log, including the following line:

    2021-Jan-18 18:40:55.861919 [0x00001960] (i) IdPAgentOAuthToken::handleRequest(): Request _1234567891234567891234567891234 was missing code parameter
    

    And I was looking at the Socialite code to try and understand where that code parameter comes from and it seems to come from the redirect() action, but I'm not sure why it's not being triggered automatically behind the scenes (or however it is supposed to work).

    If I attempt to access the /auth/redirect endpoint directly first, it does correctly redirect me over to the PortalGuard Login page, and then I'm able to login, but then it seems to get stuck in a redirect loop alternating between these two requests primarily:

    /oauth/v2/authz?client_id=987654321987654321987654&redirect_uri=http%3A%2F%2Fsocialite.test%2Fauth%2Fredirect&scope=openid+email&response_type=code&response_mode=form_post
    http://socialite.test/auth/redirect?code=RANDOMLY-GENERATED-CODE
    

    Thank you for any tips/insight you might be able to share!

    enhancement new provider 
    opened by orware 10
  • Steam Provider - wrong config key and problem with userFromToken()

    Steam Provider - wrong config key and problem with userFromToken()

    There are 2 main problems in that provider.

    Instead of api_key it should be client_secret as a key in config. Look here. She made PR for that, but it was closed.

    https://github.com/SocialiteProviders/Steam/pull/4

    Also there is problem with userFromToken($token) it doesn't work because inside that method a variable $token in not used, you can see it here.

    bug help wanted 
    opened by michaloravec 10
  • Replace LightOpenID for Steam provider

    Replace LightOpenID for Steam provider

    The Steam provider depends on LightOpenID, which is abandoned. It is currently incompatible with PHP 7.4 and has pull requests open since 2016.

    Error Exception on callback:

    Function get_magic_quotes_gpc() is deprecated
    

    From iignatov\lightopenid\openid.php:891:

    $params['openid.' . $item] = function_exists('get_magic_quotes_gpc') && get_magic_quotes_gpc() ? stripslashes($value) : $value;
    
    bug help wanted 
    opened by benjivm 10
  • [Apple] Adding method to return SocialiteUser by JWT token

    [Apple] Adding method to return SocialiteUser by JWT token

    Because getUserByToken() is a protected function, you cannot check an identity token directly from the Socialite driver. This PR intend to allow the verification of a JWT by a public function, returning a SocialiteUser, or throwing an InvalidStateException when the given JWT is incorrect

    opened by guillaumeboussion 0
  • SAML2 Provider, problem with multiple EntityDescriptors

    SAML2 Provider, problem with multiple EntityDescriptors

    Problem

    I have metadata that includes multiple entitydescriptors for different authentication providers and the one I have to use is not the first one in that file. SAML2 driver only fetches the first descriptor and uses data from that so the login fails.

    Solution

    If user provides both metadata (url or a xml-file) AND entityid config values, then only fetch entitydescriptor for that entityid. If none are found or if entityid config value is not set then return the first one. It does not break current behaviour and supports situations where you have to choose the correct entitydescriptor.

    opened by pohjolal 2
  • SAML2 Driver does not honor stateless

    SAML2 Driver does not honor stateless

    What

    The SAML2 provider does not honor the stateless configuration when used with the redirect call. This causes the SAML callback to fail as it does not exit the state check due to this and then fails as the SAML response may not contain state. It throws an InvalidState exception.

    When

    Whenever you attempt to set the redirect as stateless

    Where

    If you use the stateless configuration when producing the redirect:

    return Socialite::driver('saml2')->stateless()->redirect();
    

    The processing of the user data on the callback route will fail here vendor/socialiteproviders/saml2/Provider.php, line 444 due to this function at line 491:

        protected function hasInvalidState(): bool
        {
            if ($this->isStateless()) {
                return false;
            }
    
            $state = $this->request->session()->pull('state');
    
            return !(strlen($state) > 0 && $this->messageContext->getMessage()->getRelayState() === $state);
        }
    

    However it pulls the stateless configuration, it is not seeing it as described in the Socialite Providers documentation here

    How

    I am not sure. I have not dug deeper to find out how exactly the stateless "state" is set and propagated.

    opened by robertdeboer 3
  • add Huawei provider

    add Huawei provider

    OAuth docs: https://developer.huawei.com/consumer/en/doc/development/HMSCore-Guides/open-platform-oauth-0000001053629189

    User info: https://developer.huawei.com/consumer/en/doc/development/HMSCore-References/get-user-info-0000001060261938

    opened by 2618094 0
Owner
Socialite Providers
Socialite Providers for Laravel
Socialite Providers
A Laravel 5 package for OAuth Social Login/Register implementation using Laravel socialite and (optionally) AdminLTE Laravel package

laravel-social A Laravel 5 package for OAuth Social Login/Register implementation using Laravel socialite and (optionally) AdminLTE Laravel package. I

Sergi Tur Badenas 42 Nov 29, 2022
⚡️ Easiest way to implement Socialite for Laravel Jetstream.

Introduction Installation Usage & Setup Generating the redirect Resolving users Handling Invalid State Create account on first login Log in on registr

M'HAMMED TALHAOUY 2 Apr 11, 2022
Hej! is a simple authentication boilerplate for Socialite.

Hej! - a Socialite authentication flow implementation Hej! is a simple authentication flow implementation for Socialite. Out-of-the-box, Hej! can help

Renoki Co. 111 Oct 29, 2022
Creamos un inicio de sesión desde Facebook para nuestra aplicación web utilizando la librería de Socialite

About Laravel Laravel is a web application framework with expressive, elegant syntax. We believe development must be an enjoyable and creative experie

Carlos Villatoro 2 May 23, 2022
Open source social sign on PHP Library. HybridAuth goal is to act as an abstract api between your application and various social apis and identities providers such as Facebook, Twitter and Google.

Hybridauth 3.7.1 Hybridauth enables developers to easily build social applications and tools to engage websites visitors and customers on a social lev

hybridauth 3.3k Dec 23, 2022
Easy integration with OAuth 2.0 service providers.

OAuth 2.0 Client This package provides a base for integrating with OAuth 2.0 service providers. The OAuth 2.0 login flow, seen commonly around the web

The League of Extraordinary Packages 3.4k Dec 31, 2022
EAuth extension allows to authenticate users by the OpenID, OAuth 1.0 and OAuth 2.0 providers

EAuth extension allows to authenticate users with accounts on other websites. Supported protocols: OpenID, OAuth 1.0 and OAuth 2.0.

Maxim Zemskov 330 Jun 3, 2022
This library extends the 'League OAuth2 Client' library to provide OpenID Connect Discovery support for supporting providers that expose a .well-known configuration endpoint.

OpenID Connect Discovery support for League - OAuth 2.0 Client This library extends the League OAuth2 Client library to provide OpenID Connect Discove

null 3 Jan 8, 2022
An OAuth 2.0 bridge for Laravel and Lumen [DEPRECATED FOR LARAVEL 5.3+]

OAuth 2.0 Server for Laravel (deprecated for Laravel 5.3+) Note: This package is no longer maintaned for Laravel 5.3+ since Laravel now features the P

Luca Degasperi 2.4k Jan 6, 2023
A Simple method to create laravel authentication for an existing laravel project.

Laravel Simple Auth A Simple method to create laravel authentication for an existing laravel project. Indroduction Why I created this kind of package?

Dasun Tharanga 10 Dec 14, 2021
Laravel Auth is a Complete Build of Laravel 8 with Email Registration Verification, Social Authentication, User Roles and Permissions, User Profiles, and Admin restricted user management system.

Laravel Auth is a Complete Build of Laravel 8 with Email Registration Verification, Social Authentication, User Roles and Permissions, User Profiles, and Admin restricted user management system. Built on Bootstrap 4.

Jeremy Kenedy 2.8k Dec 31, 2022
🔐 JSON Web Token Authentication for Laravel & Lumen

Documentation Documentation for 1.* here For version 0.5.* See the WIKI for documentation. Supported by Auth0 If you want to easily add secure authent

Sean Tymon 10.7k Dec 31, 2022
Handle roles and permissions in your Laravel application

Laratrust (Laravel Package) Version Compatibility Laravel Laratrust 8.x 6.x 7.x 6.x 6.x 6.x 5.6.x - 5.8.x 5.2 5.3.x - 5.5.x 5.1 5.0.x - 5.2.x 4.0. Ins

Santiago García 2k Dec 30, 2022
Role-based Permissions for Laravel 5

ENTRUST (Laravel 5 Package) Entrust is a succinct and flexible way to add Role-based Permissions to Laravel 5. If you are looking for the Laravel 4 ve

Zizaco 6.1k Jan 5, 2023
Roles & Permissions for Laravel 8 / 7 / 6 / 5

Defender Defender is an Access Control List (ACL) Solution for Laravel 5 / 6 / 7 (single auth). (Not compatible with multi-auth) With security and usa

Artesãos 437 Dec 22, 2022
Laravel wrapper around OAuth 1 & OAuth 2 libraries.

Introduction Laravel Socialite provides an expressive, fluent interface to OAuth authentication with Facebook, Twitter, Google, LinkedIn, GitHub, GitL

The Laravel Framework 5.2k Dec 27, 2022
PHP package built for Laravel 5.* to easily handle a user email verification and validate the email

jrean/laravel-user-verification is a PHP package built for Laravel 5.* & 6.* & 7.* & 8.* to easily handle a user verification and validate the e-mail.

Jean Ragouin 802 Dec 29, 2022
LDAP Authentication & Management for Laravel

?? Hey there! Looking for something even easier to use for LDAP integration in your Laravel applications? ?? Introducing LdapRecord ?? LdapRecord is t

null 894 Dec 28, 2022
Limit access to your Laravel applications by using invite codes

Doorman Doorman provides a way to limit access to your Laravel applications by using invite codes. Invite Codes: Can be tied to a specific email addre

Ashley Clarke 964 Dec 31, 2022