SmItH197 / SteamAuthentication

A simple PHP Authentication that enables steam users to log into their steam account to access content!
MIT License
446 stars 146 forks source link

OpenID Issue #135

Open Gergo4961 opened 8 years ago

Gergo4961 commented 8 years ago

Hello!

I know some people have been having issues with this in the past but right now I know 2-3 sites that keep contacting me about this issue.

Basically their website just randomly breaks and it does not let the users log in. Sometimes if they restart their whole VPS it works for some time but the problem appears yet again in a few hours or a day.

The error is this: No OpenID Server found at http://steamcommunity.com/openid

I have looked through a few issues here and I can say these things beforehand:

If anyone could help me out I'd really appreciate it. They use an older version where you can still adjust the button size in settings.php. I also saw a lot of threads on other forums unanswered, so people randomly face this issue. It even happened to me too sometimes on my localhost when I was testing scripts, and then it disappeared.

~ Gergő

bman46 commented 8 years ago

If u are running Windows, type ping http://steamcommunity.com to see if there is a packet loss. I don't think it is the issue but it's worth a try

Gergo4961 commented 8 years ago

Hey! Thanks for the reply, unfortunately only I'm on windows but everyone else is on linux. 2 people who contacted me are actually both at OVH, not sure if that helps (maybe others reported it from that host too?).

bman46 commented 8 years ago

its will still do the ping command on Linux, but I'm not sure what the output data will be, and this won't fix it only check to see if there is a issue in the Internet communication. I tried it and it's working on my end.

bman46 commented 8 years ago

http://m.wikihow.com/Ping-in-Linux When doing this, look for the packet loss % when stopping.

Gergo4961 commented 8 years ago

Thanks,I will check it out when the issue appears again for them. Can it be something in the script causing this? Or what's in the script has nothing to do with it, I should only look into their Steamauth settings, etc?

Gergo4961 commented 8 years ago

Pinging www.steamcommunity.com works, pinging www.steamcommunity.com/openid does not (it says unknown host so I might be doing something wrong though). But it's still saying No OpenID Server found at http://steamcommunity.com/openid/id/76561197984485194

Edit.: It still adds the login parameters to the URL and when I refresh it a few times the error sometimes becomes ,,Endless redirection" instead of the No OpenID error. User is not logged in also pops up if I keep refreshing the page.

BlackCetha commented 8 years ago

First off, you ping DNS names, not HTTP-adresses. Anything with / in the address is bound to fail.

There is actually a problem with the openid info document at http://steamcommunity.com/openid/login right now. Steam itself wants to 304 (temporarily moved) redirect you. At this time, you get redirected to the https version and then to the home page.

asilvach commented 8 years ago

The developer of this Steam authentication can solve this problem ? You can see the issue on csgotwo.com about this error ...

Thanks for the time spended but i really need fix this fast ...

RedSparr0w commented 8 years ago

any chance steam servers may have just been down during the times which it did not work?

Steam is down for routine maintenance every Tuesday.

Gergo4961 commented 8 years ago

It has been happening on other days too. After this Tuesday's maintenance things have been fine on csgotwo, for now.. We'll see how it goes for the next few days!

Endzeitlive commented 8 years ago

i have the same problem at the moment

asilvach commented 8 years ago

Yea i have like 14 hours without the problem but now the problem comeback...

Endzeitlive commented 8 years ago

the error is back again!

BlackCetha commented 8 years ago

I dont think we need a event log. You can stop spamming.

I'll start working on a fix and maybe remove the openID-lib completely in the process.

I actually think this library might benefit from my approach on the topic (http://github.com/blackcetha/SteamAuthOOP). This code has been working without problems for more than a year. While I think we could actually replace the complete lib, @SmItH197 will probably not agree. This will need some discussion and time. While we do that, I'll try to make the code my lib uses work in SteamAuth.

bman46 commented 8 years ago

That's probably a good idea, the light open ID library is not even supported anymore which means no bug fixes anymore (except for copies on GitHub and other places)

asilvach commented 8 years ago

No one have news for this problem and how to fix? Because if someone restart the vps this work, after 30 min this comeback...

bman46 commented 8 years ago

No, it's probably a issue with valves servers. And if not we have not figured it out yet

asilvach commented 8 years ago

But tell me a choose, why if i restart the vps all works and if this stay 20/30 minutes live the problem back?

RedSparr0w commented 8 years ago

could you create a page with this?

<?php
function Visit($url){
       $agent = "Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0)";$ch=curl_init();
       curl_setopt ($ch, CURLOPT_URL,$url );
       curl_setopt($ch, CURLOPT_USERAGENT, $agent);
       curl_setopt ($ch, CURLOPT_RETURNTRANSFER, 1);
       curl_setopt ($ch,CURLOPT_VERBOSE,false);
       curl_setopt($ch, CURLOPT_TIMEOUT, 5);
       curl_setopt($ch,CURLOPT_SSL_VERIFYPEER, FALSE);
       curl_setopt($ch,CURLOPT_SSLVERSION,3);
       curl_setopt($ch,CURLOPT_SSL_VERIFYHOST, FALSE);
       $page=curl_exec($ch);
       //echo curl_error($ch);
       $httpcode = curl_getinfo($ch, CURLINFO_HTTP_CODE);
       curl_close($ch);
       if($httpcode>=200 && $httpcode<300) return true;
       else return false;
}
if (Visit("http://steamcommunity.com/openid")){
       echo "TEST1: ONLINE<br>";
}else{
       echo "TEST1: OFFLINE<br>";
}
ini_set("default_socket_timeout","05");
set_time_limit(5);
$f=fopen("http://steamcommunity.com/openid","r");
$r=fread($f,1000);
fclose($f);
if(strlen($r)>1) {
    echo("TEST2: ONLINE");
}
else {
    echo("TEST2: OFFLINE");
}
?>

just to make sure your server is communicating with steams server fine when you encounter the problem next

dncloud commented 8 years ago

Try wget http://steamcommunity.com/openid/id/xxxxxxxxxxxxxxxxx (replace x with a steam id) and check your response state. The script himself works fine. We have the same error after one week at OVH. After 30 minutes all working normally again.

wget http://steamcommunity.com/openid/id/xxxxxxxxxxxxxxxxx --2016-05-26 23:33:16-- http://steamcommunity.com/openid/id/xxxxxxxxxxxxxxxxx Resolving »steamcommunity.com (steamcommunity.com)«... 23.38.3.235 Connection to steamcommunity.com (steamcommunity.com)|23.38.3.235|:80... connected. HTTP request send, awaiting response... 403 Forbidden 2016-05-26 23:33:16 ERROR 403: Forbidden.

asilvach commented 8 years ago

The file have this:

> <?xml version="1.0" encoding="UTF-8"?>
> <xrds:XRDS xmlns:xrds="xri://$xrds" xmlns="xri://$xrd*($v*2.0)">
>   <XRD>
>       <Service priority="0">
>           <Type>http://specs.openid.net/auth/2.0/signon</Type>        
>           <URI>https://steamcommunity.com/openid/login</URI>
>       </Service>
>   </XRD>
> </xrds:XRDS>
dolnma commented 8 years ago

--2016-05-29 19:08:55-- http://steamcommunity.com/openid/id/XXX Resolving steamcommunity.com (steamcommunity.com)... 23.214.82.109 Connecting to steamcommunity.com (steamcommunity.com)|23.214.82.109|:80... connected. HTTP request sent, awaiting response... 403 Forbidden 2016-05-29 19:08:55 ERROR 403: Forbidden.

in browser, as well file with

<?xml version="1.0" encoding="UTF-8"?>
<xrds:XRDS xmlns:xrds="xri://$xrds" xmlns="xri://$xrd*($v*2.0)">
    <XRD>
        <Service priority="0">
            <Type>http://specs.openid.net/auth/2.0/signon</Type>        
            <URI>https://steamcommunity.com/openid/login</URI>
        </Service>
    </XRD>
</xrds:XRDS>

Any solution? Im thinking about reinstalling VPS with new ip adress....