Closed nzoschke closed 1 year ago
Hey @nzoschke šš»
The user struct in go-auth0 only contains the properties supported by Auth0, our suggestion for supporting custom properties from an IDP is to provide a custom User struct as shown here.
Please let me know if you have any questions.
Ok thank you! Missed that in the docs.
Checklist
Description
Using the Management API explorer, I see that the
GET /users/:id
API returns the user profile with extra details from an identity provider that matches the "Raw JSON" in the user management UI.However using the Go client, the User struct doesn't have a place to unmarshal these extra details.
https://github.com/auth0/go-auth0/issues/34 is possibly related, but in this API the extra details are on the top level response, not under
user.identities
.Perhaps the
User
struct could have one more field with the complete API response in amap[string]interface{}
?Expectation
When the User Raw JSON is like
A call to
auth0.User.Read(profile.ID)
will allow a client to get additional identity provider details likeorganization_id
00D46000001EXAMPLE
Reproduction
organization_id
00D46000001EXAMPLE
in API response from GET /users/:id callauth0.User.Read(profile.ID)
callAuth0 Go SDK version
main