Im trying to implement my own registration form and I came across the following issue:
user is being registered to the db, but the code never gets to the “then()” portion of the function. I copy the example from here () and this still happens.
Code that reproduces:
import wixUsers from 'wix-users';
import wixLocation from 'wix-location';
$w.onReady(function () {
let email = "mm@m.com"// the user's email addresses
let password = "019283tt"// the user's password
let firstName = "shira"// the user's first name
let lastName = "sidfds"// the user's last name
wixUsers.register(email, password, {
contactInfo: {
"firstName": firstName,
"lastName": lastName
}
} ).then( (result) => {
console.log("GOT TO THEN");
let resultStatus = result.status;
wixLocation.to("/home");
} );
});
The user is registered fine, but I never get to the “GOT TO THEN” where I want to redirect the user after registration. I would expect it to register and get to the “then” handler. Please help.