const options = {
method: ‘POST’,
url: ISS_AUTH0_DOMAIN + ‘oauth/token’,
headers: {‘content-type’: ‘application/json’},
data: {
grant_type: ‘http://auth0.com/oauth/grant-type/passwordless/otp’,
client_id: AUTH0_CLIENT_ID,
client_secret: AUTH0_CLIENT_SECRET,
username: body.username,
otp: body.code,
realm: ‘email’,
scope: ‘openid profile email offline_access’
}
};
Response:
data: {
error: ‘access_denied’,
error_description: “Cannot read property ‘length’ of undefined”
}