Download the PHP package mrstebo/laravel-socialite-ekm without Composer
On this page you can find all versions of the php package mrstebo/laravel-socialite-ekm. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download mrstebo/laravel-socialite-ekm
More information about mrstebo/laravel-socialite-ekm
Files in mrstebo/laravel-socialite-ekm
Package laravel-socialite-ekm
Short Description EKM OAuth2 Provider for Laravel Socialite
License MIT
Informations about the package laravel-socialite-ekm
Laravel-Socialite-EKM
EKM OAuth2 Provider for Laravel Socialite
This package allows you to use Laravel Socialite using EKM.
Installation
You can install the package via composer:
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:
You will also need to add credentials for the OAuth application that you can get using your EKM Partners account. They should be placed in your config/services.php
file. You may copy the example configuration below to get started:
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:
Of course, you will need to define routes to your controller methods:
The redirect method takes care of sending the user to the OAuth provider, while the user method will read the incoming request and retrieve the user's information from the provider.
EKM OAuth2 does not support scopes on request, all scopes are configured in OAuth application settings.
Retrieving user details
Once you have a user instance, you can grab a few more details about the user: