auth0 / go-auth0

Go SDK for the Auth0 Management API.
https://auth0.com
MIT License
123 stars 54 forks source link

Changing UserMetadata and AppMetadata on User struct to use json.Rawmessage #388

Closed JHarperFox closed 4 months ago

JHarperFox commented 4 months ago

🔧 Changes

Considering the endpoints to create and update an user in Auth0 require app_metadata and user_metadata to be JSON objects I propose switching those variables from *map[string]interface{} to json.RawMessage.

This will allow ease of use within applications for marshalling and unmarshaling the values into structs without the overhead for dealing with type assertions or need for 3rd party libraries with deeply nested values.

📚 References

Create user API docs: https://auth0.com/docs/api/management/v2/users/post-users Update user API docs: https://auth0.com/docs/api/management/v2/users/patch-users-by-id

🔬 Testing

📝 Checklist

developerkunal commented 4 months ago

Hi @JHarperFox ,

After reviewing the pull request, we've noticed that it contains breaking changes. At this time, we've decided not to proceed with integrating these changes into the current version. However, we appreciate your effort and will certainly consider incorporating them into version 2. Thank you for your work!