Skip to content

Commit

Permalink
Merge pull request #105 from grandsilence/master
Browse files Browse the repository at this point in the history
Realm override. Bypass domain ban by Valve.
  • Loading branch information
invisnik authored Mar 28, 2019
2 parents 431b081 + d89bda1 commit 3bf98ce
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 3 deletions.
6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,14 +52,18 @@ return [
* Redirect URL after login
*/
'redirect_url' => '/auth/steam/handle',
/*
* Realm override. Bypass domain ban by Valve. Use alternative domain with redirection to main for authentication (banned by valve).
*/
// 'realm' => 'redirected.com',
/*
* API Key (set in .env file) [http://steamcommunity.com/dev/apikey]
*/
'api_key' => env('STEAM_API_KEY', ''),
/*
* Is using https?
*/
'https' => false
'https' => false,
];

```
Expand Down
8 changes: 7 additions & 1 deletion config/config.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,19 @@
* Redirect URL after login
*/
'redirect_url' => '/',

/*
* Realm override. Bypass domain ban by Valve. Use alternative domain with redirection to main for authentication (banned by valve).
*/
//'realm' => 'redirected.com',

/*
* API Key (set in .env file) [http://steamcommunity.com/dev/apikey]
*/
'api_key' => env('STEAM_API_KEY', ''),

/*
* Is using https ?
*/
'https' => false,

];
3 changes: 2 additions & 1 deletion src/SteamAuth.php
Original file line number Diff line number Diff line change
Expand Up @@ -209,11 +209,12 @@ private function buildUrl($return = null)
throw new RuntimeException('The return URL must be a valid URL with a URI scheme or http or https.');
}

$realm = Config::get('steam-auth.realm', $this->request->server('HTTP_HOST'));
$params = [
'openid.ns' => self::OPENID_NS,
'openid.mode' => 'checkid_setup',
'openid.return_to' => $return,
'openid.realm' => (Config::get('steam-auth.https') ? 'https' : 'http').'://'.$this->request->server('HTTP_HOST'),
'openid.realm' => (Config::get('steam-auth.https') ? 'https' : 'http').'://'.$realm,
'openid.identity' => 'http://specs.openid.net/auth/2.0/identifier_select',
'openid.claimed_id' => 'http://specs.openid.net/auth/2.0/identifier_select',
];
Expand Down

0 comments on commit 3bf98ce

Please sign in to comment.