harrygulliford / socialite-microsoft-graph
Microsoft Graph Provider for Laravel Socialite
Installs: 3 997
Dependents: 0
Suggesters: 0
Security: 0
Stars: 3
Watchers: 2
Forks: 1
Open Issues: 0
Requires
- php: ^7.3|^8.0
- illuminate/support: ^6.0|^7.0|^8.0|^9.0|^10.0
- laravel/socialite: ^5.0
README
This package extends Laravel Socialite to give a convenient method of authenticating via the Microsoft Graph OAuth2 provider.
Support for Laravel 6+ and Socialite 5+, using PHP 7.3+ & 8.0+.
Installation
You can install the package via composer:
composer require harrygulliford/socialite-microsoft-graph
Then add the service to your config/services.php
file:
'microsoft-graph' => [
'client_id' => env('MS_GRAPH_KEY'),
'client_secret' => env('MS_GRAPH_SECRET'),
'tenant_id' => env('MS_GRAPH_TENANT_ID', 'common'),
'redirect' => env('MS_GRAPH_REDIRECT_URL'),
],
Usage
You are able to use the provider in the same manner as a regular Socialite provider.
return Socialite::with('microsoft-graph')->redirect();
For more information, please refer to the Laravel Socialite documentation.
License
The MIT License (MIT). Please see the license file for more information.