I have an app which is using Username-Password-Authentication. The login was previously working but has been failing off & on over the past few days.
Here is my fetch function:
return await fetch_response_pair_(`https://${AUTH0_DOMAIN_(ctx)}/oauth/token`, {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify(body)
})
Where the body is:
{
username: 'USERNAME',
password: 'PASSWORD',
client_id: 'CLIENT_ID,
client_secret: 'CLIENT_SECRET,
grant_type: 'password',
audience: 'https://mi-www.us.auth0.com/api/v2/',
scope: 'openid profile email',
connection: 'Username-Password-Authentication',
realm: 'Username-Password-Authentication'
}
The response log is:
POST /auth|payload|error {
status: 403,
payload: {
error: 'invalid_grant',
error_description: 'Wrong email or password.'
}
}