This package is a custom Criipto driver for Laravel Socialite. This packages may be used for authenticating users with MitID
You can install the package via composer:
composer require uptime-development/laravel-socialite-criipto
Once you install the package, you will ned to create a account on https://criipto.id
Add the config values in you config/services.php
configuration file from the newly created account:
'criipto' => [
'base_uri' => env('CRIIPTO_URI'),
'client_id' => env('CRIIPTO_CLIENT_ID'),
'client_secret' => env('CRIIPTO_CLIENT_SECRET'),
'redirect' => env('CRIIPTO_REDIRECT_URI'),
],
You can nowuse the driver as you would use it in the Laravel Socialite's official documentation. Use criipto
keyword when you want to use the driver followed with the extra parameter to define the acr_values
Route::get('/auth/redirect', function () {
return Socialite::driver('criipto')
->with(['acr_values' => 'urn:grn:authn:dk:mitid:low'])
->redirect();
});
Route::get('/auth/callback', function () {
$user = Socialite::driver('criipto')->user();
dd($user);
});
composer test
Please see CHANGELOG for more information on what has changed recently.
Please see CONTRIBUTING for details.
If you discover any security related issues, please email [email protected]
The MIT License (MIT). Please see License File for more information.
[ ] Github Action - Should run tests and php-cs-fixer