Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/vikas5914/steam-auth
A simple PHP Steam login and User Detail package
https://github.com/vikas5914/steam-auth
composer login php steam steam-api steam-auth steam-authentication steam-client steam-login steambot
Last synced: 3 months ago
JSON representation
A simple PHP Steam login and User Detail package
- Host: GitHub
- URL: https://github.com/vikas5914/steam-auth
- Owner: vikas5914
- Created: 2017-06-09T08:01:23.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2022-03-07T23:02:54.000Z (over 2 years ago)
- Last Synced: 2024-07-08T06:05:27.892Z (4 months ago)
- Topics: composer, login, php, steam, steam-api, steam-auth, steam-authentication, steam-client, steam-login, steambot
- Language: PHP
- Size: 10.7 KB
- Stars: 17
- Watchers: 4
- Forks: 10
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- awesome-steam - steam-auth - An alternative Steam authentication library with Composer support. (Packages / PHP)
README
# Steam authentication and User Details
[![Latest Stable Version](https://poser.pugx.org/vikas5914/steam-auth/v/stable)](https://packagist.org/packages/vikas5914/steam-auth) [![Total Downloads](https://poser.pugx.org/vikas5914/steam-auth/downloads)](https://packagist.org/packages/vikas5914/steam-auth) [![License](https://poser.pugx.org/vikas5914/steam-auth/license)](https://packagist.org/packages/vikas5914/steam-auth) [![GitHub issues](https://img.shields.io/github/issues/vikas5914/steam-auth.svg)](https://github.com/vikas5914/steam-auth/issues) [![Packagist](https://img.shields.io/packagist/dd/vikas5914/steam-auth.svg)](https://packagist.org/packages/vikas5914/steam-auth)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!
## Installation Via Composer
Add this to your `composer.json` file, in the require object:
```javascript
"vikas5914/steam-auth": "1.*"
```After that, run `composer install` to install the package.
#### OR
```javascript
composer require vikas5914/steam-auth:1.*
```
## Usage example```php
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 "Logout";
} else {
echo "Login";
}
```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.
Check if the user is logged in with `$steam->loggedIn();` (Will return true or false)
## Planned
1. Test Case
2. Better ReadMe## Legal stuff
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
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
[![forthebadge](http://forthebadge.com/images/badges/you-didnt-ask-for-this.svg)](http://forthebadge.com)