byo-software / steam-openid-connect-provider

Steam OpenID Connect Identity Provider (IdP)
MIT License
67 stars 24 forks source link

How to get other claims besides sub, preferred_username and name? #6

Closed Siljesc closed 4 years ago

Siljesc commented 4 years ago

I tried to map the picture claim in the profile scope but it wasn't getting saved. Only the sub and username properties. So, I checked the console and found this:

steam_1     | [17:00:21 Debug] IdentityServer4.ResponseHandling.UserInfoResponseGenerator
steam_1     | Requested claim types: sub name family_name given_name middle_name nickname preferred_username profile picture website gender birthdate zoneinfo locale updated_at
steam_1     | 
steam_1     | [17:00:21 Debug] IdentityServer4.ResponseHandling.UserInfoResponseGenerator
steam_1     | Scopes in access token: openid profile
steam_1     | 
steam_1     | [17:00:21 Information] IdentityServer4.ResponseHandling.UserInfoResponseGenerator
steam_1     | Profile service returned the following claim types: sub preferred_username name

Apparently the picture and other claims are being requested but only sub, preferred_username and name are being returned.

Is it possible to get those claims?

Trojaner commented 4 years ago

Valve does not expose the other claims, hence it is not possible.

Siljesc commented 4 years ago

What if we use https://api.steampowered.com/ISteamUser/GetPlayerSummaries/v0002/?key=&steamids to manually insert the other claims?

It would give us the picture, given_name, nickname and maybe others claims. I could do it on my app but it would be great if it was just managed by the provider.

Trojaner commented 4 years ago

Sadly I do not have the time to work on that, but I would happily accept contributions for it.