Good day,
we’re doing a “test drive” of your wonderful service, but we ran into an issue when we try to sign in a user.
We have a NodeJS service that is using your auth0 npm package (version ^2.37.0). We’re using this documentation: https://auth0.github.io/node-auth0/module-auth.DatabaseAuthenticator.html.
Thanks in advance!
Kind regards,
Valentin
Our code looks like this:
const client = new AuthenticationClient({
domain: process.env.AUTH0_ACCOUNT,
clientId: process.env.CLIENT_ID
});
let signUpCreds = {
email: `test1@test.bg`,
password: 'asd',
connection: 'Username-Password-Authentication'
};
client.database.signUp(signUpCreds, (error, userData) => {
// This actually creates a user in your system
});
let signInCreds = {
username: `test1@test.bg`,
password: 'asd',
connection: 'Username-Password-Authentication'
};
client.database.signIn(signInCreds, (error, userData) => {
// This throws an error
});
The error:
SanitizedError {
name: 'APIError',
message: '{}',
statusCode: 404,
requestInfo: { method: 'post', url: 'https://...auth0.com/oauth/ro' },
originalError: Error: Not Found
at Request.callback (.../node/index.js:879:15)
at IncomingMessage.<anonymous> (.../node/index.js:1129:18)
at IncomingMessage.emit (node:events:406:35)
at endReadableNT (node:internal/streams/readable:1329:12)
at processTicksAndRejections (node:internal/process/task_queues:83:21) {
status: 404,
response: Response {
_events: [Object: null prototype] {},
_eventsCount: 0,
_maxListeners: undefined,
res: [IncomingMessage],
request: [Request],
req: [ClientRequest],
text: 'Not Found',
body: {},
files: undefined,
buffered: true,
headers: [Object],
header: [Object],
statusCode: 404,
status: 404,
statusType: 4,
info: false,
ok: false,
redirect: false,
clientError: true,
serverError: false,
error: [Error],
created: false,
accepted: false,
noContent: false,
badRequest: false,
unauthorized: false,
notAcceptable: false,
forbidden: false,
notFound: true,
unprocessableEntity: false,
type: 'text/plain',
charset: 'utf-8',
links: {},
setEncoding: [Function: bound ],
redirects: [],
pipe: [Function (anonymous)],
[Symbol(kCapture)]: false
}
}