tobymaxham / phoenix-socialite
PhoenixII OAuth2 Provider for Laravel Socialite
Fund package maintenance!
TobyMaxham
Requires
- php: ^8.2
- ext-json: *
- illuminate/support: ^11.9
- laravel/socialite: ^5
Requires (Dev)
- friendsofphp/php-cs-fixer: ^3.0
- orchestra/testbench: ^9.2
- phpunit/phpunit: ^11.3
- rector/rector: ^1.2
README
This package can be used to add a Laravel Socialite driver using the PhoenixII OAuth2-API.
If you do not have a laravel installation, please check out my other package which can be used without a framework: https://github.com/TobyMaxham/phoenixii-oauth2
Installation
composer require tobymaxham/phoenix-socialite
Configuration & Basic Usage
As an organisation using PhoenixII you can use this package for any third party software to enable OAuth2. This will give your users an easy and comfortable way to use the third party application. A users wich is already a registered user on your PhoenixII instance, they do not need to register a second account on your platform.
For more information read the documentation: https://tricept.atlassian.net/wiki/spaces/PIIWIKI/pages/976912387/OAuth+2+-+Schnittstelle
Add configuration to config/services.php
'phoenix-auth' => [ 'instance' => 'https://{instance}.it4sport.de', 'client_id' => env('PHOENIX_CLIENT_ID'), 'client_secret' => env('PHOENIX_CLIENT_SECRET'), 'redirect' => env('PHOENIX_REDIRECT_URI'), 'token' => env('PHOENIX_BEARER_TOKEN'), ],
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('phoenix-auth')->redirect();
Returned User fields
id
firstname
lastname
email
birthday
organisation
licenses
functions
addresses
Important note
This package is not developed or maintained by PhoenixII (it4sport). This package was created using the public OAuth-Documentation.
Testing
composer test
Changelog
Please see CHANGELOG for more information on what has changed recently.
Security Vulnerabilities
If you've found a bug regarding security please mail git@maxham.de instead of using the issue tracker.
Support me
Credits
License
The MIT License (MIT). Please see License File for more information.