Well just swap your login lightbox code to what I use and it should all work fine again. I am not saying your code is wrong in anyway as you state that it was working fine before they had the Wix Turbo and Wix Code to Wix Corvid change of name.
I am simply giving you another option to fix this as my custom login and signup lightboxes were made up over a year ago now and the code for both of them hasn’t changed , nor has it needed to be changed after any changes by Wix like the Wix Turbo rollout or the change in name to Wix Corvid. My code for both lightboxes has been working fine non-stop.
However, the Wix Code name change to Wix Corvid shouldn’t have had any effect on your working code as it was only a name change and nothing in the code should have been affected.
The only thing that I have noticed in your final code above in your latest post, is that you haven’t got a onReady call at the start of your code underneath the imports, you’ve just gone from your imports straight into your button onclick events.
My forgot password is just a one line text element on the lightbox which simply says ‘Forgot Password’, which when they click on it, it then takes them to the Wix Forgot Password window (eventually we will be able to do our own design like login/signup lightboxes.)
Apart from the forgot password text line, the only things I have on my login lightbox are my logo and the user inputs for email and password. Plus, I also have another one line text element which is just a simple link through the element itself to my custom signup lightbox just in case they wish to register instead
Your choice if you want to change anything, however if you are still struggling with getting yours to work, then I would suggest just trying it to see if it works for yourself too. This would then give you time to see if you can play around and get your original code reworking, without having to have the worry of your code not working on your website whilst you work on a fix.
Obviously you will need to change in your code
//from this
wixLocation.to(wixLocation.url);
//to this
wixLocation.to(`/account/my-account`);
My custom login lightbox code again:
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_onclick(event) {
let email = $w("#email").value;
let password = $w("#password").value;
wixUsers.login(email, password)
.then( () => {
console.log("User is logged in");
wixWindow.lightbox.close();
wixLocation.to(wixLocation.url); //This reloads the same page and allows code to show hidden member parts.
} )
.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.
} );
}