Download the PHP package framgia-education/laravel-omniauth-hrsystem without Composer
On this page you can find all versions of the php package framgia-education/laravel-omniauth-hrsystem. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package laravel-omniauth-hrsystem
Documentation
To get started with FramgiaAuth, use Composer to add the package to your project's dependencies:
composer require framgia-education/laravel-omniauth-hrsystem
Configuration
After installing the FramgiaAuth library, register the Framgia\Education\Auth\FramgiaAuthServiceProvider
in your config/app.php
configuration file:
Also, add the FAuth
facade to the aliases
array in your app
configuration file:
You will also need to add credentials for the OAuth services your application utilizes. These credentials should be placed in your config/services.php
configuration file, and use the key framgia
. For example:
Basic Usage
Next, 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 Framgia Auth using the FAuth
facade:
The redirect
method takes care of sending the user to the Framgia Auth provider, while the user
method will read the incoming request and retrieve the user's information from the provider.
Of course, you will need to define routes to your controller methods:
Retrieving User Details
Once you have a user instance, you can grab a few more details about the user:
Retrieving User Details From Token
If you already have a valid access token for a user, you can retrieve their details using the userFromToken
method:
All versions of laravel-omniauth-hrsystem with dependencies
guzzlehttp/guzzle Version ~5.0|~6.0
illuminate/contracts Version ~5.0
illuminate/http Version ~5.0
illuminate/support Version ~5.0