Laravel Walkway aims to provide a simple and intuitive interface for authenticating with the Truckspace ID OAuth server.
To get started, install Walkway using Composer:
composer require truckspace/laravel-walkway
Next, publish Walkways's resources:
php artisan vendor:publish --provider="Truckspace\Walkway\WalkwayServiceProvider"
This command will publish Walkways's config file and default migrations.
Next, you should migrate your database:
php artisan migrate
Laravel Socialite provides a simple way to authenticate with OAuth providers. Walkway provides a Truckspace driver to make authentication as easy as possible.
To use the Truckspace socialite driver, you will need to create an application on the Truckspace ID developers page. These credentails should then be placed in your config/services.php
configuration file:
'truckspace' => [
'client_id' => env('TRUCKSPACE_CLIENT_ID'),
'client_secret' => env('TRUCKSPACE_CLIENT_SECRET'),
'redirect' => env('TRUCKSPACE_REDIRECT_URI'),
],
Finally, add the following environment varables:
# Truckspace OAuth
TRUCKSPACE_BASE_URL=
TRUCKSPACE_CLIENT_ID=
TRUCKSPACE_CLIENT_SECRET=
TRUCKSPACE_REDIRECT_URI=
You can now use the Truckspace socialite driver like any other driver:
Socialite::driver('truckspace');
composer test
The MIT License (MIT). Please see License File for more information.