Steam OpenID Connect Identity Provider (IdP)
Find a file
2020-10-13 01:13:03 +03:00
src Fix not being able to login when some steam info is missing 2020-10-13 01:13:03 +03:00
.dockerignore Initial code commit 2019-05-02 00:41:28 +03:00
.gitattributes Add gitattributes 2019-05-02 00:58:57 +03:00
.gitignore Add AddDeveloperSigningCredential 2019-05-02 01:09:56 +03:00
Dockerfile Docker: Fix wrong base image version 2020-10-08 06:59:51 +03:00
LICENSE Initial commit 2019-05-02 00:28:11 +03:00
README.md Update readme 2020-10-08 06:11:33 +03:00
SteamOpenIdConnectProvider.sln Rename to steam-openid-connect-provider; add health checks 2019-10-13 17:18:29 +03:00

Steam OpenId Connect Provider

Steam OpenID 2.0 -> OpenID Connect Provider Proxy

About

This server allows you to use Steam as an OpenID Connect Identity provider (OIDC IDP). This way you can use Steam logins in KeyCloak or any other OpenID Connect based authentication client.

Setup

Add your Steam API Key as user-secrets like this: dotnet user-secrets set "Authentication:Steam:ApplicationKey" "MySteamApiKey"

Alternatively you can set it up via environment variables: Authentication__Steam__ApplicationKey=MySteamApiKey (Keep in mind that this is easier but more insecure)

After that set up your redirect URI, ClientID and ClientSecret in the appsettings.json.

OpenID Configuration

You can access Authorization and Token endpoint details in http://<Your Host>/.well-known/openid-configuration

Supported Scopes

The following scopes are supported: openid, profile.

If you use the profile scope, you get access to the picture, given_name, website and nickname claims too.

HTTPS Support

This server does not support https connections. If you want to use https connections please use a reverse proxy like nginx.

Running behind reverse proxies

Some reverse proxy setups might require additional configuration, like setting the path base or origin.

To set the origin, set Hosting:PublicOrigin in the appsettings.json or the Hosting__PublicOrigin environment variable to your desired origin. If not set, the origin name is inferred from the request.

Similary, you can use the Hosting:PathBase in the appsettings.json or the Hosting__PathBase environment variable to set the path base. If not set, it will default to "/".

Health checks

This service contains a health check endpoint at /health. It checks if the Steam login servers are working.

Docker

A docker image is also available.

docker run -it \
    -e OpenID__RedirectUri=http://localhost:8080/auth/realms/master/broker/steam/endpoint \
    -e OpenID__ClientID=steamidp \ 
    -e OpenID__ClientSecret=mysecret \
    -e Authentication__Steam__ApplicationKey=MySteamApiKey \
    --restart unless-stopped \
    --name steamidp \
    imperialplugins/steam-openid-connect-provider

License

MIT