Gate Connector helps you to connect your oauth client to connect to your oauth server of choice via socialite. Your default Login automatically redirects to the oauth server.
You can install the package via composer:
composer require looxis/gate
Add some properties to your .env
file (see .env.example)
GATE_ENABLED=true
GATE_URL="https://gate.example.com/"
GATE_CLIENT_ID=3
GATE_CLIENT_SECRET=client_secret
Publish and Run migration
php artisan vendor:publish --tag=gate-migrations
php artisan migrate
Add gate_id
and api_token
to fillable array in User model.
Also you can change auth callback route and controller in config or in .env
file
GATE_AUTH_CALLBACK_URI="auth/callback"
GATE_AUTH_CALLBACK_CONTROLLER="App\\Http\\Controllers\\Auth\\LoginController"
Change use AuthenticatesUsers
statement in App\Http\Controllers\Auth\LoginController
or any other login controller you want to use with Looxis Gate.
use AuthenticatesUsers, LoginControllerTrait {
LoginControllerTrait::loggedOut insteadof AuthenticatesUsers;
LoginControllerTrait::showLoginForm insteadof AuthenticatesUsers;
}
loggedOut
should be called from logout
method of this controller (if you override it).
Also you can publish the config file with this artisan command:
php artisan vendor:publish --tag=gate-config
composer test
Please see CHANGELOG for more information what has changed recently.
Please see CONTRIBUTING for details.
If you discover any security related issues, please email dev@looxis.com instead of using the issue tracker.
The MIT License (MIT). Please see License File for more information.
This package was generated using the Laravel Package Boilerplate.