auth0/go-auth0

Add LastPasswordReset field to management.User struct

dschreij opened this issue · 6 comments

Describe the problem

The API provides a last_password_reset field if relevant, but the management.User struct has no field to deserialize it to.

What was the expected behavior?

I think it should be possible to read the last_password_reset field when necessary, so this field should be added to the struct.

Reproduction

  1. Create/sign up as a new user
  2. Set a password
  3. Retrieve this user record from the Auth0 management API
  4. Observe that it is not possible to access the last_password_reset data.

Environment

Version v0.10.1

If you think this is a valid request, I can also submit a PR (unless your structs are auto-generated).

Hey @dschreij 👋🏻 this is totally a valid request:) Happy to review your PR if you wanna take a go at it 👍🏻

Hey @dschreij I had some time and I went ahead and actually added this field to the User struct in #125.

Great @sergiught. Apologies, I was caught up in stuff and didn't get to it yet, but thanks for taking care of this.

And wow: the go structs are generated from a Java codebase?

This is now available in the latest release https://github.com/auth0/go-auth0/releases/tag/v0.12.0 as such we'll be closing this down 🥳

They are not generated from a Java codebase @dschreij, I just added a reference to another management SDK from Java that already has the field added :)