filippo-toso/mailup-socialite

MailUp OAuth2 Provider for Laravel Socialite
14
Install
composer require filippo-toso/mailup-socialite
Latest Version:v1.0.1
PHP:^5.6 || ^7.0
License:MIT
Last Updated:Aug 21, 2017
Links: GitHub  ·  Packagist
Maintainer: filippo.toso

MailUp Socialite Provider

Use your MailUp account with Laravel Socialite.

Requirements

  • PHP 5.6+
  • socialiteproviders/manager 2.0+

Installing

Use Composer to install it:

composer require filippo-toso/mailup-socialite

Using It

  • Remove Laravel\Socialite\SocialiteServiceProvider from your providers[] array in config\app.php if you have added it already.
  • Add \SocialiteProviders\Manager\ServiceProvider::class 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
];

Note: If you would like to use the Socialite Facade, you need to install it.

Add the Event and Listeners

  • Add SocialiteProviders\Manager\SocialiteWasCalled 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 'SocialiteProviders\MailUp\MailUpExtendSocialite@handle',.
  • Note: You do not need to add anything for the built-in socialite providers unless you override them with your own providers.

For example:

Environment Variables

If you add environment values to your .env as exactly shown below, you do not need to add an entry to the services array. Append provider values to your .env file

// other values above
MAILUP_KEY=yourkeyfortheservice
MAILUP_SECRET=yoursecretfortheservice
MAILUP_REDIRECT_URI=https://example.com/login   

Add to config/services.php.

You do not need to add this if you add the values to the .env exactly as shown above. The values below are provided as a convenience in the case that a developer is not able to use the .env method

'mailup' => [
    'client_id' => env('MAILUP_KEY'),
    'client_secret' => env('MAILUP_SECRET'),
    'redirect' => env('MAILUP_REDIRECT_URI'),  
],

Related Packages

erirk/paypalpayment

laravel-paypalpayment is simple package help you process direct credit card paym...

0
gabrieloliverio/laravel5-generators

Database metadata-based generators for Laravel 5

1
doctrine/dbal

Powerful PHP database abstraction layer (DBAL) with many features for database s...

628,058,007 9,707
laravel/framework

The Laravel Framework.

576,155,700 34,907
laravel/tinker

Powerful REPL for the Laravel framework.

485,678,092 7,440