Steam Login/Auth package for Laravel/Lumen 5.5+ / 6.x+ / 7.x+ / 8.x+
kanalumaddela/laravel-steam-login is a Laravel package for steam login/auth package for laravel/lumen 5.5+ / 6.x+ / 7.x+ / 8.x+.
It currently has 9 GitHub stars and 9.570 downloads on Packagist (latest version 2.5.2).
Install it with composer require kanalumaddela/laravel-steam-login.
Discover more Laravel packages by kanalumaddela
or browse all Laravel packages to compare alternatives.
Last updated
Make sure you have made/performed the appropriate migrations. I suggest doing whatever works best for you, but certain suggestions should be followed to avoid trouble.
| Version | PHP Version | Laravel/Lumen Version | Docs | | ------- | ----------- | ----------------------------- | ---- | | 1.x | 7.0+ | 5.5+ | Docs | | 2.x | 7.1+ | 5.6+ | Docs | | 3.x | 7.2+ | 6.0+ / 7.0+ / 8.0+ | Docs (I/P) |
SteamUserclass to easily retrieve a player's datacomposer require kanalumaddela/laravel-steam-login
php artisan vendor:publish --force --provider kanalumaddela\LaravelSteamLogin\SteamLoginServiceProvider
php artisan make:controller Auth\SteamLoginController
routes/web.phpuse App\Http\Controllers\Auth\SteamLoginController;
use kanalumaddela\LaravelSteamLogin\Facades\SteamLogin;
//...
// If using steam login only, add ['include_login_route' => true]
// to also add a /login route,
SteamLogin::routes([
'controller' => SteamLoginController::class,
]);
App\Http\Controllers\Auth\SteamLoginController.php<?php
namespace App\Http\Controllers\Auth;
use Illuminate\Http\Request;
use kanalumaddela\LaravelSteamLogin\Http\Controllers\AbstractSteamLoginController;
use kanalumaddela\LaravelSteamLogin\SteamUser;
class SteamLoginController extends AbstractSteamLoginController
{
/**
* {@inheritdoc}
*/
public function authenticated(Request $request, SteamUser $steamUser)
{
// auth logic goes here, below assumes User model with `steam_account_id` attribute
// $user = User::where('steam_account_id', $steamUser->accountId)->first();
// \Illuminate\Support\Facades\Auth::login($user);
}
}
Thanks to these libs which led me to make this