Skip to content

Authenticated users using steam openid and/or gather users informations (/using their SteamID64)!

License

Notifications You must be signed in to change notification settings

Hexer10/SteamAuth

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SteamAuth

Authenticated users using steam openid or gather users informations!

You can find a full documentaion here about the used API, a smaller doc about the properties & function it's on the class PHPDoc.

This requires openid.php (Included in this repo.)

Usage

//Require our library.
require "libs/SteamAuth.php"

//Costruct our class
$auth = new SteamAuth('APIKEY'); //Get apikey from https://steamcommunity.com/dev/apikey

Now we can to two things:

  • Authenticate a user
$auth->initOpenID('welcome.php', 'a random key'); //A secure key to encrypt our cookie data.
header("Location:" . $auth->getLoginURL()); //Redirect to login url.
  • Get user infomations by SteamID64.
$auth->getPlayerSum($_GET['steamid']);

Finally we can get information about the user:

echo $auth->username; //Get client display name.
echo $auth->realname; //Get client real name if specified.
//And so on

I sugged to check the Examples pages for more complex examples.

Found bugs or features that would suit in this projects?

Request or reort it opening a new issue!

Todo

  • Add composer.
  • Add more steam api functions.

About

Authenticated users using steam openid and/or gather users informations (/using their SteamID64)!

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages