Giter Site home page Giter Site logo

laravel-steam-login's Introduction

Steam Auth/Login for Laravel 5.5+

Maintainability Packagist Packagist version PHP from Packagist GitHub stars GitHub forks GitHub issues GitHub license

Make sure you have made/performed your migrations along with updating your User model if you plan to follow the examples. I suggest doing whatever works best for you, but certain suggestions should be followed.

Version PHP Version Laravel Version Docs
1.x 7.0+ 5.5+ Docs
2.x 7.1+ 5.6+ Docs

Features

  • redirect users to the page they were on before logging in
  • SteamUserclass to easily retrieve a player's data
  • included controller and routes for easy setup

Quick Setup (2.x, Laravel 5.6+)

  1. Install library
composer require kanalumaddela/laravel-steam-login

php artisan vendor:publish --force --provider kanalumaddela\LaravelSteamLogin\SteamLoginServiceProvider
  1. Add routes

routes/web.php

use App\Http\Controllers\Auth\SteamLoginController;
use kanalumaddela\LaravelSteamLogin\Facades\SteamLogin;

//...

SteamLogin::routes(['controller' => SteamLoginController::class]);
php artisan make:controller Auth\SteamLoginController

App\Http\Controllers\Auth\SteamLoginController.php

<?php

namespace App\Http\Controllers\Auth;

use Illuminate\Http\Request;
use Illuminate\Support\Facades\Auth;
use Illuminate\Support\Facades\Hash;
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
        // e.g. $user = User::where('steam_account_id', $steamUser->accountId)->first();
    }
}

Credits

Thanks to these libs which led me to make this

laravel-steam-login's People

Contributors

craighulme avatar dependabot[bot] avatar expdev07 avatar j0sh0nat0r avatar kanalumaddela avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.