Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Data returned from signUp mismatches SignUpResponse #991

Open
5 tasks done
jdockwarder opened this issue Feb 20, 2024 · 1 comment
Open
5 tasks done

Data returned from signUp mismatches SignUpResponse #991

jdockwarder opened this issue Feb 20, 2024 · 1 comment
Labels
bug This points to a verified bug in the code

Comments

@jdockwarder
Copy link

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

@jdockwarder jdockwarder added the bug This points to a verified bug in the code label Feb 20, 2024
@patlux
Copy link

patlux commented May 29, 2024

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": "[email protected]",
  "email_verified": false
 }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug This points to a verified bug in the code
Projects
None yet
Development

No branches or pull requests

2 participants