# Steam Authentication & Integration

**URL:** <https://meta.discourse.org/t/steam-authentication-integration/68413>\
**Category:** Marketplace\
**Created:** [August 20, 2017, 7:48am UTC](https://meta.discourse.org/t/steam-authentication-integration/68413 "2017-08-20T07:48:57Z")\
**Posts on this page:** 1\
**Showing post:** 8

<div class="post-metadata">

**Author:** ![LeoMcA](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/leomca/32/87233_2.png) [@LeoMcA](https://meta.discourse.org/u/LeoMcA)\
**Post date:** [August 21, 2017, 12:47pm UTC](https://meta.discourse.org/t/steam-authentication-integration/68413/8 "2017-08-21T12:47:54Z")

</div>

> [@pfaffman](#):
>
> it’s non-trivial and will take changes to core.

To do this with the authentication methods provided in core, sure - but for Steam I’m relatively confident you could just extend [`discourse-steam-login`](https://github.com/discourse/discourse-steam-login). Here’s how I’d go about it (if I had the time):

> [@Morell](#):
>
> you can’t add a steam account on an existing discourse account

- add a “associate with steam account” button in user preferences with a plugin outlet
- link it to a plugin-controlled server side route
- this route handles authenticating the user with steam, fetching the steam user id, and associating it with the user in discourse like so:  
`::PluginStore.set('steam', "steam_uid_#{data[:steam_uid]}", {user_id: user.id })`
- now a user can authenticate using whatever method they’re currently logged in with, or steam, and be logged into the same account

> [@Morell](#):
>
> you can’t see the steam profile of a discourse user

Plugin outlets would come to the rescue here again. Difficult to go into the specifics with no knowledge of what data from Steam you want to show in Discourse, and how the Steam API works. Might be possible entirely client side, might require a small server side piece.

> [@Morell](#):
>
> And you can’t import steam auth from other forum CMS.

As @pfaffman says, this wouldn’t be part of the plugin, but an importer script.

---

_[View the full topic](https://meta.discourse.org/t/steam-authentication-integration/68413)._
