logto-io / go

☁️ Logto Golang SDKs.
MIT License
19 stars 11 forks source link

bug: Profile scopes not available #137

Open NhProGamer opened 1 day ago

NhProGamer commented 1 day ago

Describe the bug

When you has the default webserver gin code and when the logged user has attributes like family_name, the server does not seems to show that value, when i change the struct UserInfoResponse and i add FamilyName string json:"family_name" the server send me the attribute

Expected behavior

The server should correctly send me that info

How to reproduce?

Use the default golang example gin server, login with a user that have profile attributes like that { "familyName": "John", "givenName": "Doe, "nickname": "NhPro" }

Context

image

NhProGamer commented 1 day ago

The documentation said: Other standard claims include family_name, given_name, middle_name, nickname, preferred_username, profile, website, gender, birthdate, zoneinfo, and locale will be also included in the profile scope without the need for requesting the userinfo endpoint. A difference compared to the claims above is that these claims will only be returned when their values are not empty, while the claims above will return null if the values are empty. BUT it dodn't work at all