sander0542/sander-auth-socialite

There is no license information available for the latest version (1.0.1) of this package.

Sander Auth OAuth2 Provider for Laravel Socialite

1.0.1 2020-02-09 13:46 UTC

This package is auto-updated.

Last update: 2024-04-10 02:00:14 UTC


README

Sander Auth provider for Laravel Socialite

Usage

Socialite::with('sander-auth')->redirect();

Development

Requirements

  • PHP 7.2 or higher
  • Laravel 6.0 or higher

Installation

  1. Add this repository to composer.json
"repositories": [
  {
    "type": "vcs",
    "url":  "git@github.com:sander0542/sander-auth-socialite.git"
  }
]
  1. Add the repository to composer: composer require sander0542/sander-auth-socialite
  2. Add the SocialiteWasCalled to app/Providers/EventServiceProvider.php
protected $listen = [
  // a whole bunch of listeners
  \SocialiteProviders\Manager\SocialiteWasCalled::class => [
    // add your listeners (aka providers) here
    'SocialiteProviders\\SanderAuth\\SanderAuthExtendSocialite@handle',
  ],
];
  1. Add the Sander Auth settings to config/services.php
'sander-auth' => [
  'client_id' => env('SANDER_AUTH_CLIENT_ID'),
  'client_secret' => env('SANDER_AUTH_CLIENT_SECRET'),
  'redirect' => env('SANDER_AUTH_REDIRECT_URI'),
],