I am also getting the following warning:
backend.js:6 Following parameters are not allowed on the
/authorize
endpoint: [user_metadata]
However this states you can pass metadata:
And here is my signup function:
const signUp = async (email, password, prepaid, discount) => {
await new Promise(function (resolve, reject) {
auth0Client.redirect.signupAndLogin({
"connection": 'Username-Password-Authentication',
"email": email,
"password": password,
"user_metadata": {"prepaid": `${prepaid}`, "discount": `${discount}`}
}, (err) => {
if (err) {
if (err.code === "user_exists" || err.code === "username_exists") {
setAuthError(["That name is already in our system. Login or try again?"])
} else if (
err.code === "password_dictionary_error" || err.code === "password_no_user_info_error"
) {
setAuthError(["That password might be too easy to guess.", "Try something that's not a common word"])
} else if (
err.code === "password_strength_error"
) {
setAuthError(["That password might be too easy to guess.", "(Did you include a number, capital letter and special character?)"])
}
else {
console.log('Something went wrong: ' + err.code)
setAuthError(["Hmm, that doesn't look right. Please try again."])
}
return reject(new Error(err.code))
}
else {
setUser(getUser());
setAuthenticated(true);
console.log("finished sign up")
}
})
});
}