gridplay/gridplayaccounts

GridPlay OAuth2 Provider for Laravel Socialite

Installs: 17

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 0

Forks: 0

Open Issues: 0

pkg:composer/gridplay/gridplayaccounts

1.0 2025-09-29 18:54 UTC

This package is auto-updated.

Last update: 2025-10-01 21:29:28 UTC


README

Installation & Basic Usage

To use first install with composer

    "require": {
        "gridplay/gridplayaccounts": "^1.0",
    }
composer update

or do...

composer require gridplay/gridplayaccounts

Add configuration to config/services.php

'gridplayaccounts' => [    
  'client_id' => env('GPA_CLIENT_ID'),  
  'client_secret' => env('GPA_CLIENT_SECRET'),  
  'redirect' => env('GPA_REDIRECT_URI') 
],

Add provider event listener

Laravel 11+

In your Providers/AppServiceProvider.php put the following in the boot function

use Illuminate\Support\Facades\Event;
use \GPA\GpaProvider;
    public function boot(): void
    {
        Event::listen(function (\SocialiteProviders\Manager\SocialiteWasCalled $event) {
            $event->extendSocialite('gridplayaccounts', GpaProvider::class);
        });
    }

Usage

You should now be able to use the provider like you would regularly use Socialite (assuming you have the facade installed):

return Socialite::driver('gridplayaccounts')->redirect();
$user = Socialite::driver('gridplayaccounts')->user();
$gpid = $user->id;
$name = $user->name;
// etc.

Returned User fields

  • id
  • name
  • email