invisnik / laravel-steam-auth

Laravel Steam Auth
MIT License
172 stars 67 forks source link

validate() fails due to realm mismatch (reverse nignx proxy with cloudflare ssl) (fixed but potential feature request?) #15

Closed barratt closed 8 years ago

barratt commented 8 years ago

Using a reverse proxy with nginx and cloudflare and I was getting a redirect loop to the steam login page. When actually doing a dd() I noticed the URL was considerable smaller than usual and actually stated an openid error:

mydomain/login?openid.ns=http%3A%2F%2Fspecs.openid.net%2Fauth%2F2.0&openid.mode=error&openid.error=realm+and+return_to+do+not+match

I managed to fix this by simply ignoring the check on line 131

'openid.realm' => 'https' . '://' . $this->request->server('HTTP_HOST'),

I know this isn't a very good fix but it works for my situation. I'm just posting here incase any others have an issue. One option might be to build ssl into the config and instead of getting it from

$https = $this->request->server('HTTPS');

get it from the config instead

barratt commented 8 years ago

Feel free to close the issue when you've seen it as I have fixed my situation.

Gummibeer commented 8 years ago

@LeCoffee The problem is more in the way L#131 was written: solution is provided in PR #23 and it's an issue with all https schemes - look Issue #22.