vandario / sso
sso is OAuth2.0 server provider
Installs: 2 919
Dependents: 0
Suggesters: 0
Security: 0
Stars: 4
Watchers: 1
Forks: 4
Open Issues: 0
Requires
- php: ^8.1
- laravel/framework: ^9.2|^10.0
README
requirements
- PHP v8.1
- Laravel >= v9.2
Installation
composer require vandario/sso
Documentation
Example:
edit: routes/web.php
<?php
use Illuminate\Support\Facades\Route;
use Vandar\Sso\SsoService;
Route::get('/auth/redirect', function () {
return SsoService::redirect();
});
Route::get('/auth/callback', function () {
return SsoService::authorizationCode();
});
edit: app/Http/Kernel.php
add to protected $routeMiddleware:
'vandar' => \Vandar\Sso\Middleware\VandarAuthenticate::class,
php artisan vendor:publish
and select sso
you can set configs:
server_uri
client_id
client_secret
redirect_uri
response_type
scope
login_by
or set in env:
SSO_SERVER_URI=https://accounts.vandara.io
SSO_CLIENT_ID=id
SSO_CLIENT_SECRET=secret
SSO_REDIRECT_URI=https://escrow.vandar.io/auth/callback
To get access_token to connect service to service: SsoService::clientCredentials()