auth0/node-auth0

Data returned from signUp mismatches SignUpResponse

Opened this issue · 1 comments

Checklist

  • I have looked into the Readme, Examples, and FAQ and have not found a suitable solution or answer.
  • I have looked into the API documentation and have not found a suitable solution or answer.
  • I have searched the issues and have not found a suitable solution or answer.
  • I have searched the Auth0 Community forums and have not found a suitable solution or answer.
  • I agree to the terms within the Auth0 Code of Conduct.

Description

When signing up a new user, using the authentication api, the data returned from auth0.database.signUp() does not match the type SignUp Response.

SignUpResponse is telling there is a id key in the response. The actual response however does not contain that key, but _id. When using the key _id gives me a compilation error, because of the type mismatch.

Reproduction

  1. Sign up a new user using auth0.database.signUp(...)
  2. Check the response for the missing id key

Additional context

I'm using the auth0 sdk in a Nest.js application

node-auth0 version

4.3.1

Node.js version

20.11.0

I can confirm the issue. I get the following as response:

const auth0User = await auth0.database.signUp({ ... })
console.log(JSON.stringify(auth0User.data, null, 2))

{
  "given_name": "Patrick",
  "family_name": "Wozniak",
  "name": "Patrick Wozniak",
  "_id": "66579a6a6f77950e322ced56",
  "email": "hi@patwoz.de",
  "email_verified": false
 }