OpenID (Steam) authentication how to?

Quick question, how to add openid authentication correctly? At the moment I managed to add a Discord, but not openid (Steam)

Probably I just need add some extra code to SOCIALACCOUNT_PROVIDERS ? https://django-allauth.readthedocs.io/en/latest/providers.html#openid But all my attempts were unsuccessful. :neutral_face:

I would be grateful for any help :v:

Hey!

You’ll need to add a new provider, see how support for GitLab was added for example:

Here are the docs for the django-allauth part:
https://django-allauth.readthedocs.io/en/latest/providers.html#steam

Hey, thanks for the answer! Yes, I did almost everything as you showed. But not sure what exactly I should write in these two parts:

Steam Accounts

STEAM_CLIENT_ID = os.environ.get("STEAM_CLIENT_ID")
STEAM_SECRET_KEY = os.environ.get("STEAM_SECRET_KEY")

All settings related to the AllAuth

SOCIALACCOUNT_PROVIDERS = {
    "fxa": {
        "SCOPE": FXA_SCOPE,
        "OAUTH_ENDPOINT": FXA_OAUTH_ENDPOINT,
        "PROFILE_ENDPOINT": FXA_PROFILE_ENDPOINT,
    },
    "gitlab": {"GITLAB_URL": GITLAB_URL, "SCOPE": ["read_user"]},
  
    'steam': {
        'SERVERS': [
            dict(id='steam',
                 name='Steam',
                 openid_url='https://steamcommunity.com/openid'),
        ]
    },
}

With the configuration as above, I will not be redirected to Steam, and a link in the address bar be like this: /accounts/steam/login/?next=/

Hi @Alan.v

To support a new provider like Steam, you have to modify the code in the same way as it was done here: https://github.com/mozilla/pontoon/commit/3462eff11975cf5442bc03d3ba6b617666f94fd2

Unfortunately, it requires a little bit more work than setting the environment variables.

If you’re interested in working on a patch to add a Steam auth provider, I can try to help you by doing a review.

Hi @jotes
As soon as it works, I will immediately send you a pull request :+1:, but so far I have a problem with the two sections that I described above.

Well, after hours of trying, I just started from scratch and repeated the changes that @jotes and @mathjazz showed. And finally got to the Steam login page. But, when i press sign something is going wrong.

I have attached a link to the log:

I have a guess that something needs to be added to the allauth_urls.py file. And it looks like I won’t be able to implement it without help from the developers. :neutral_face:

Update: the work to add support for authentication using Steam is tracked in Bugzilla.

Note that it’s a P5 bug, since Mozilla doesn’t require Steam for authentication.