PHPackages                             mrstebo/laravel-socialite-ekm - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Authentication &amp; Authorization](/categories/authentication)
4. /
5. mrstebo/laravel-socialite-ekm

ActiveLibrary[Authentication &amp; Authorization](/categories/authentication)

mrstebo/laravel-socialite-ekm
=============================

EKM OAuth2 Provider for Laravel Socialite

v0.1.0(6y ago)0841MITPHPPHP &gt;=7.0.0

Since Feb 22Pushed 6y ago1 watchersCompare

[ Source](https://github.com/mrstebo/Laravel-Socialite-EKM)[ Packagist](https://packagist.org/packages/mrstebo/laravel-socialite-ekm)[ RSS](/packages/mrstebo-laravel-socialite-ekm/feed)WikiDiscussions master Synced yesterday

READMEChangelogDependencies (2)Versions (2)Used By (0)

Laravel-Socialite-EKM
=====================

[](#laravel-socialite-ekm)

EKM OAuth2 Provider for Laravel Socialite

[![Packagist](https://camo.githubusercontent.com/d012ee3a31d5c92efbaecab1f737e5d264e1bc095e91100c90a02df4320cbfe2/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6d72737465626f2f6c61726176656c2d736f6369616c6974652d656b6d2e7376673f6d61784167653d32353932303030)](https://packagist.org/packages/mrstebo/laravel-socialite-ekm)[![Software License](https://camo.githubusercontent.com/55c0218c8f8009f06ad4ddae837ddd05301481fcf0dff8e0ed9dadda8780713e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](LICENSE.md)[![StyleCI](https://camo.githubusercontent.com/3ea8283a812a081e63edfa5296f13c782368fe1f605d476c06bf161a7b38f2c7/68747470733a2f2f7374796c6563692e696f2f7265706f732f3234313231343738382f736869656c64)](https://styleci.io/repos/241214788)

This package allows you to use Laravel Socialite using EKM.

Installation
------------

[](#installation)

You can install the package via composer:

```
composer require mrstebo/laravel-socialite-ekm
```

---

**Note:** if you use Laravel 5.5+ you can skip service provider registration, because it should be auto discovered.

Then you should register service provider in your `config/app.php` file:

```
'providers' => [
    // Other service providers

    Mrstebo\LaravelSocialiteEkm\Provider::class,

]
```

You will also need to add credentials for the OAuth application that you can get using your [EKM Partners](http://partners.ekm.net/) account. They should be placed in your `config/services.php` file. You may copy the example configuration below to get started:

```
'ekm' => [
    'client_id' => env('EKM_CLIENT_ID'),
    'client_secret' => env('EKM_CLIENT_SECRET'),
    'redirect' => env('EKM_REDIRECT'),
],
```

Basic usage
-----------

[](#basic-usage)

So now, you are ready to authenticate users! You will need two routes: one for redirecting the user to the OAuth provider, and another for receiving the callback from the provider after authentication. We will access Socialite using the Socialite facade:

```
