Implementing Steam's OpenID login

I remember once before not too long ago, I was able to implement Discord and Steam as a login method for my website (which I removed as I discontinued the project I was making at the time.)

Today I started working on a new project for a Community I’m part of which offered both these platforms as a login method, but I couldn’t get Discord implemented because of a “Couldn’t resolve discord.com” error, I went to try implementing Steam, and get greeted with

openid.mode=error&openid.error=Steam+only+supports+OpenID+2.0

attached in my URL, although I’m implementing it correctly (and I even followed the same tutorials I’ve followed before that worked) did something change recently with InfinityFree? I tried looking stuff up and only can find things from 2018 on here.

Discord is blocked on free hosting

That looks like a code issue, not a firewall issue

6 Likes

It looks like your software is not compatible with Steam for authentication. Even if they claim compatibility, it would seem that Steam upgraded to a newer version of the authentication protocol which your website does not support. If so, that’s an issue that should be fixed in your website software.

6 Likes

Apparently, I had an oversight, it seems https://specs.openid.net/auth/2.0 is supposed to be “http” instead of “https”, after correcting that, it started working for Steam.

but far as Discord goes, I wasn’t aware discord was blocked, as I was able to use it before🙃, but since its meant to be blocked, I’ll just disregard that to prevent issues.

I guess if anyone else encounters this issue via this method, then ensure the init file is

$login_url_params = [
    'openid.ns'         => 'http://specs.openid.net/auth/2.0',
    'openid.mode'       => 'checkid_setup',
    'openid.return_to'  => 'your_return_url_here',
    'openid.realm'      => (!empty($_SERVER['HTTPS']) ? 'https' : 'http').'://'.$_SERVER['HTTP_HOST'],
    'openid.identity'   => 'http://specs.openid.net/auth/2.0/identifier_select',
    'openid.claimed_id' => 'http://specs.openid.net/auth/2.0/identifier_select',
];
1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.