How to get lastLogin, created, passwordChanged user attributes with React and okta-auth-js?

As you surmised, the getUserInfo method sends the access token you provide to the /userinfo endpoint to get information about their claims, so the only information you will be returned would be the custom claims you configured as well as any of the user claims that are associated with the ‘openid’ and ‘profile’ scopes requested, as documented in this list.

The information you want is, as mentioned in that StackOverflow post, available by making a GET request to the /users endpoint which you can make from your application’s back-end. You can do this manually or use one of the management SDKs, such as the Node.js SDK.

1 Like