truckersmp / steam-socialite
Laravel Socialite provider for Steam OpenID.
Installs: 9 274
Dependents: 0
Suggesters: 0
Security: 0
Stars: 11
Watchers: 5
Forks: 4
Open Issues: 0
Requires
- php: ^7.3|^8.0
- ext-json: *
- guzzlehttp/guzzle: ^6.5|^7.0
- illuminate/contracts: ^6.0|^7.0|^8.0|^9.0|^10.0|^11.0
- illuminate/http: ^6.0|^7.0|^8.0|^9.0|^10.0|^11.0
- illuminate/support: ^6.0|^7.0|^8.0|^9.0|^10.0|^11.0
- laravel/socialite: ^4.4|^5.0
Requires (Dev)
- phpunit/phpunit: ^9.3
- squizlabs/php_codesniffer: ^3.5
README
Introduction
The TruckersMP PHP library for Laravel Socialite provides an adapter for the Steam OpenID authentication.
Requirements
- PHP 7.3
- Composer
- Laravel 6.x (or newer)
- Laravel Socialite 4.4 (or newer)
Installation
To get started, use Composer to add the package to your application:
composer require truckersmp/steam-socialite
Following the documentation of Laravel Socialite,
you will also need to add credentials for the Steam service. These credentials
should be placed in your config/services.php
configuration file:
'steam' => [ 'client_id' => null, 'client_secret' => env('STEAM_SECRET'), 'redirect' => env('STEAM_REDIRECT_URI'), ],
As OpenID does not use the client_id
and client_secret
properties, the latter
is actually utilized as the Steam API key and is used for fetching the user data.
For more information about the API, check the Steam developer portal.
Do not forget to put new environment variables into your .env
application file:
# Steam OpenID STEAM_SECRET= STEAM_REDIRECT_URI=
Laravel 5.5+ uses Package Auto-Discovery, so does not require you to manually
add the SteamSocialiteProvider
.
If you do not use auto-discovery, you will need register the provider in your
config/app.php
configuration file as a package service provider:
'providers' => [ // ... /* * Package Service Providers... */ TruckersMP\SteamSocialite\SteamSocialiteProvider::class, // ... ],
Consult the documentation of Laravel Socialite to implement the application functionality.
Support
If you have any questions about the library, you can create a topic on our forum.
License
This package is open-source and is licensed under the MIT license.