Package Data | |
---|---|
Maintainer Username: | jhaoda |
Maintainer Contact: | jhaoda@gmail.com (JhaoDa) |
Package Create Date: | 2015-04-26 |
Package Last Update: | 2021-03-21 |
Language: | PHP |
License: | MIT |
Last Refreshed: | 2024-11-14 15:07:48 |
Package Statistics | |
---|---|
Total Downloads: | 56,257 |
Monthly Downloads: | 912 |
Daily Downloads: | 48 |
Total Stars: | 23 |
Total Watchers: | 4 |
Total Forks: | 8 |
Total Open Issues: | 0 |
composer require jhaoda/socialite-mailru
Laravel\Socialite\SocialiteServiceProvider
from your providers[]
array in config\app.php
if you have added it already.SocialiteProviders\Manager\ServiceProvider
to your providers[]
array in config\app.php
.For example:
'providers' => [
// a whole bunch of providers
// remove 'Laravel\Socialite\SocialiteServiceProvider',
SocialiteProviders\Manager\ServiceProvider::class, // add
];
Add SocialiteProviders\Manager\SocialiteWasCalled::class
event to your listen[]
array in <app_name>/Providers/EventServiceProvider
.
Add your listeners (i.e. the ones from the providers) to the SocialiteProviders\Manager\SocialiteWasCalled[]
that you just created.
The listener that you add for this provider is JhaoDa\SocialiteProviders\MailRu\MailRuExtendSocialite::class
.
Note: You do not need to add anything for the built-in socialite providers unless you override them with your own providers.
For example:
/**
* The event handler mappings for the application.
*
* @var array
*/
protected $listen = [
SocialiteProviders\Manager\SocialiteWasCalled::class => [
JhaoDa\SocialiteProviders\MailRu\MailRuExtendSocialite::class
],
];
Add to config/services.php
:
'mailru' => [
'client_id' => env('MAILRU_ID'),
'client_secret' => env('MAILRU_SECRET'),
'redirect' => env('MAILRU_REDIRECT'),
],
Append provider values to your .env
file:
// other values above
MAILRU_ID=your_app_id_for_the_service
MAILRU_SECRET=your_app_secret_for_the_service
MAILRU_REDIRECT=https://example.com/login