https://${process.env.AUTH0_DOMAIN}/oauth/token failure

Ready to post? :mag: First, try searching for your answer.
const response = await axios.post(
https://${process.env.AUTH0_DOMAIN}/oauth/token,
{
grant_type: ‘password’,
username: user_data.email,
password: user_data.password,
scope: ‘openid profile email’,
client_id: process.env.AUTH0_LOG_IN_CLIENT_ID,
audience: process.env.AUTH0_AUDIENCE,
client_secret: process.env.AUTH0_LOG_IN_CLIENT_SECRET
},
{
headers: {
‘Content-Type’: ‘application/json’,
‘Accept’: ‘application/json’
},
}
);

I have implemented custom sign in and sign up. This code has been working for the past 1 month. Today we started seeing the above error when getting a token for the user.
The error occurs both in our dev and prod environment.

In the monitoring logs I see

  • Type

Failed Exchange
“description”: “We could not create your account.\nPlease contact support for assistance.cus_Q8UnDAjX3mEP5J”,
“connection”: “Username-Password-Authentication”,

The sign in and sign up code we have did not change. Intermittently we were able to get the access token - maybe 1 in 30 tries today.

Hello,
It seems there’s an issue with obtaining a token for user authentication, resulting in a “Failed Exchange” error. The error message indicates a problem with creating the account and advises contacting support for assistance. Despite no changes indigo credit card to the sign-in and sign-up code, the error persists across both development and production environments.