Issue with Sign Up / Login Buttons

Hi everyone,

Im having issues with Wix Corvid and the specific issue is that my sign up and login buttons don’t seem to be working anymore. My code seems okay from what i remember but now they dont work. The buttons just seem to be dead. Any ideas?

Hi,

Thanks for replying!

Below is the code:

import wixUsers from ‘wix-users’;
import wixLocation from ‘wix-location’;
import wixWindow from ‘wix-window’;

$w.onReady( function () {
$w(“#forgotPassword”).onClick( (event) => {
//wixWindow.lightbox.close()
wixUsers.promptForgotPassword()
.then( ( ) => {
//
} )
. catch ( (err) => {
let errorMsg = err; //“The user closed the forgot password dialog”
});
});
});

export function loginButton_click(event) {

let email = $w(“#email”).value;
let password = $w(“#password”).value;

wixUsers.login(email, password)
.then( () => {
console.log(“User is logged in”);
wixLocation.to(“/account/my-account”); //Change the URL ending to whatever page you want to send the user to after they log in.
} )
. catch ( (err) => {
console.log(err);
$w(“#errorMessage”).expand(); // You can delete this line if you are not going to add an error message. Use a regular text element set to ‘collapse on load’ from the Properties Panel.
} );
}

Firstly, your code is fine, however please just double check that your login button still has the onClick event handler setup for it in the button’s properties panel, so that this line will still work in your code.

 export function loginButton_click(event) {

If it is and I’m assuming that it still is, then you are one of the unfortunate ones who are caught up in the Wix issue as seen here in other forum posts recently.
https://www.wix.com/corvid/forum/community-discussion/wix-users-and-more-is-down
https://www.wix.com/corvid/forum/community-discussion/help-login-and-signup-just-stopped-working