2019-10-13 14:30:32 +00:00
# Steam OpenId Connect Provider
2020-12-01 16:40:36 +00:00
2019-10-13 14:18:29 +00:00
Steam OpenID 2.0 -> OpenID Connect Provider Proxy
2019-05-01 21:32:45 +00:00
## About
2020-12-01 16:40:36 +00:00
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.
2019-05-01 21:32:45 +00:00
## Setup
2020-12-01 16:40:36 +00:00
2019-05-01 21:32:45 +00:00
Add your Steam API Key as user-secrets like this:
`dotnet user-secrets set "Authentication:Steam:ApplicationKey" "MySteamApiKey"`
2019-12-27 15:23:53 +00:00
Alternatively you can set it up via environment variables:
2020-10-08 03:11:33 +00:00
`Authentication__Steam__ApplicationKey=MySteamApiKey`
2019-12-27 15:23:53 +00:00
(Keep in mind that this is easier but more insecure)
2019-05-01 21:32:45 +00:00
After that set up your redirect URI, ClientID and ClientSecret in the appsettings.json.
2020-12-01 16:40:36 +00:00
If you need to set up multiple redirect URIs, you can set them separated by a comma.
`OpenID__RedirectUri="http://localhost:8080/auth/realms/master/broker/steam/endpoint, http://localhost:8080/auth/realms/dev/broker/steam/endpoint"`
2020-07-12 11:51:30 +00:00
## OpenID Configuration
2020-12-01 16:40:36 +00:00
2020-07-12 11:51:30 +00:00
You can access Authorization and Token endpoint details in
2020-07-12 12:02:47 +00:00
`http://<Your Host>/.well-known/openid-configuration`
2020-07-12 11:51:30 +00:00
2020-10-08 03:11:33 +00:00
## Supported Scopes
2020-12-01 16:40:36 +00:00
2020-10-08 03:11:33 +00:00
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.
2020-07-12 12:00:24 +00:00
## HTTPS Support
2020-12-01 16:40:36 +00:00
2021-10-21 05:55:58 +00:00
The server itself does not support https connections. If you want to use https connections please use a reverse proxy like nginx. The [example docker-compose.yml ](https://github.com/byo-software/steam-openid-connect-provider/blob/master/docker-compose.yml ) contains an example setup.
2020-07-12 12:00:24 +00:00
## Running behind reverse proxies
2020-12-01 16:40:36 +00:00
2020-07-12 12:02:21 +00:00
Some reverse proxy setups might require additional configuration, like setting the path base or origin.
2020-07-12 12:00:24 +00:00
2020-07-12 12:02:21 +00:00
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.
2020-07-12 12:00:24 +00:00
2020-07-12 12:02:21 +00:00
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 "/".
2020-07-12 12:00:24 +00:00
2019-10-13 14:35:44 +00:00
## Health checks
2020-12-01 16:40:36 +00:00
2020-10-08 03:11:33 +00:00
This service contains a health check endpoint at `/health` . It checks if the Steam login servers are working.
2019-10-13 14:35:44 +00:00
2019-05-01 22:27:56 +00:00
## Docker
2020-12-01 16:40:36 +00:00
2021-10-21 05:56:50 +00:00
[A docker image ](https://github.com/byo-software/steam-openid-connect-provider/pkgs/container/steam-openid-connect-provider ) is also available.
2019-05-01 22:27:56 +00:00
```
docker run -it \
-e OpenID__RedirectUri=http://localhost:8080/auth/realms/master/broker/steam/endpoint \
2020-12-01 16:40:36 +00:00
-e OpenID__ClientID=steamidp \
2019-05-01 22:27:56 +00:00
-e OpenID__ClientSecret=mysecret \
2021-10-21 05:46:44 +00:00
-e OpenID__ClientName=myclientname \
-e Steam__ApplicationKey=MySteamApiKey \
2019-05-01 22:27:56 +00:00
--restart unless-stopped \
2019-10-13 14:18:29 +00:00
--name steamidp \
2021-10-21 05:46:44 +00:00
ghcr.io/byo-software/steam-openid-connect-provider
2019-05-01 22:27:56 +00:00
```
2020-12-01 16:40:36 +00:00
2019-05-01 21:32:45 +00:00
## License
2020-12-01 16:40:36 +00:00
2021-10-21 05:46:44 +00:00
[MIT ](https://github.com/byo-software/steam-openid-connect-provider/blob/master/LICENSE )