2017 © Pedro Peláez
 

library steam-auth

A simple PHP Steam login and User Detail package

image

vikas5914/steam-auth

A simple PHP Steam login and User Detail package

  • Saturday, July 28, 2018
  • by vikas5914
  • Repository
  • 1 Watchers
  • 6 Stars
  • 106 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 3 Forks
  • 0 Open issues
  • 4 Versions
  • 22 % Grown

The README.md

Steam authentication and User Details

Latest Stable Version Total Downloads License GitHub issues Packagist, (*1)

This package enables you to easily log users in via Steam and get user details , using their OpenID service. However, this package does not require that you have the OpenID PHP module installed!, (*2)

Installation Via Composer

Add this to your composer.json file, in the require object:, (*3)

"vikas5914/steam-auth": "1.*"

After that, run composer install to install the package., (*4)

OR

composer require vikas5914/steam-auth:1.*

Usage example

require __DIR__ . '/vendor/autoload.php';

$config = array(
    'apikey' => 'xxxxxxxxxxxxxxxxx', // Steam API KEY
    'domainname' => 'http://localhost:3000', // Displayed domain in the login-screen
    'loginpage' => 'http://localhost:3000/index.php', // Returns to last page if not set
    "logoutpage" => "",
    "skipAPI" => false, // true = dont get the data from steam, just return the steamid64
);

$steam = new Vikas5914\SteamAuth($config);

if ($steam->loggedIn()) {
    echo "Hello " . $steam->personaname . "!";
    echo "<a href='" . $steam->logout() . "'>Logout</a>";
} else {
    echo "<a href='" . $steam->loginUrl() . "'>Login</a>";
}

User-Data is accessible through $steam->varName; You can find a basic list of variables in the demo file or a more advanced one in the code., (*5)

Check if the user is logged in with $steam->loggedIn(); (Will return true or false), (*6)

Planned

  1. Test Case
  2. Better ReadMe

If you choose to use the steam web-api you need to follow the Steam Web API Terms of Use found at http://steamcommunity.com/dev/apiterms, (*7)

The marked code is taken from Syntax_Error's "Ultra Simple Steam-Login" Class found at http://forums.steampowered.com/forums/showthread.php?t=1430511, (*8)

forthebadge, (*9)

The Versions

28/07 2018

dev-master

9999999-dev

A simple PHP Steam login and User Detail package

  Sources   Download

MIT

The Requires

  • php >=5.4.0

 

steam steam auth steam-login steam-auth steam login steam-user steam user

28/07 2018

v1.0.2

1.0.2.0

A simple PHP Steam login and User Detail package

  Sources   Download

MIT

The Requires

  • php >=5.4.0

 

steam steam auth steam-login steam-auth steam login steam-user steam user

13/06 2017

v1.0.1

1.0.1.0

A simple PHP Steam login and User Detail package

  Sources   Download

MIT

The Requires

  • php >=5.4.0

 

steam steam auth steam-login steam-auth steam login steam-user steam user

10/06 2017

v1.0

1.0.0.0

A simple PHP Steam login and User Detail package

  Sources   Download

MIT

The Requires

  • php >=5.4.0

 

steam steam auth steam-login steam-auth steam login steam-user steam user