auth0 / node-auth0

Node.js client library for the Auth0 platform.
MIT License
637 stars 308 forks source link

Add support for userInfo endpoint #872

Closed frederikprijck closed 1 year ago

frederikprijck commented 1 year ago

Changes

Add support for the userInfo endpoint, which we missed in the initial beta.

Testing

Please describe how this can be tested by reviewers. Be specific about anything not tested and reasons why. If this library has unit and/or integration testing, tests should be added for new functionality and existing tests should complete without errors.

Checklist

adamjmcgrath commented 1 year ago

I wonder if the Users service should not be part of AuthenticationClient, since we don't want to require users to provide a clientId to call the userinfo endpoint

We should probably just export UsersClient along with AuthenticationClient and ManagementClient

adamjmcgrath commented 1 year ago

Or we could make clientId optional and add a runtime check in the base auth api client?

frederikprijck commented 1 year ago

Thinking about it from the Auth0 side, it's part of the Authentication API docs. I am happy with both, but leaning towards part of AuthApi (it also was like that before).

Happy to make clientId optional and run-time check in the base-auth-api.

frederikprijck commented 1 year ago

Updated the PR to ensure the UserInfoClient is a separate client instead of a sub-client on the Auth side.

frederikprijck commented 1 year ago

I missed telemetry and some tests, updated.