khlystou / socialite-yandex-driver
Yandex driver for Laravel socialite package
v1.0.2
2023-12-08 22:52 UTC
Requires
- php: ^8.0|^8.1|^8.2
- ext-curl: *
- ext-json: *
Requires (Dev)
- phpunit/phpunit: ^9.5.8
Conflicts
- laravel/socialite: <5.11
This package is auto-updated.
Last update: 2025-04-09 02:05:34 UTC
README
Installation
composer require khlystou/socialite-yandex-driver
Add configuration to config/services.php
'yandex' => [ 'client_id' => env('YANDEX_CLIENT_ID'), 'client_secret' => env('YANDEX_CLIENT_SECRET'), 'redirect' => env('YANDEX_REDIRECT') ],
Usage
You should now be able to use the provider like you would regularly use Socialite (assuming you have the facade installed):
class AuthController extends Controller { // some code... public function redirect(): RedirectResponse { return Socialite::driver('yandex')->redirect(); } public function callback() { $user = Socialite::driver('yandex')->user(); // some code... } // some code... }
Returned User fields
id
nickname
name
email
avatar