Hello, I am working on a website that has a custom registration login area as lightbox. The forget password function is not working.
[code|
import wixUsers from ‘wix-users’;
import wixData from ‘wix-data’;
import wixLocation from ‘wix-location’;
import wixWindow from ‘wix-window’;
import { session } from ‘wix-storage’;
var userId, userEmail;
$w.onReady( function () {
//TODO: write your page related code here…
});
export function button2_click(event, $w) {
login();
}
export function password_keyPress(event, $w) {
if (event.key === “Enter”) login();
}
export async function login() {
$w(“#textFail”).hide();
let email = $w(“#email”).value;
let password = $w(“#password”).value;
It seems that you are calling that promise without resolving it so it does not finish. To fix this just simply chain a . then() to it so that it can be resolved, like so:
wixUsers.promptForgotPassword()
.then(() => {
//Runs if successful
console.log("Password reset submitted");
}).catch((err) => {
//Runs if there is error and displays the error
console.log('error: ', err);
});
Hi Roi, Please note that the Client Site had to go live on 9/27/18 so I made a workaround for the forgot password. I put a white box and new blue text link to a password reset form. The form goes to me then I manually have to delete the member from the member list, send the user a message with a link to resubmit the New KindCraft Member form.
The website is https://www.kindcraft.org/
When a user clicks on RSVP button on home page, Log in button on footer, or Sign up button on the Get Involved page, the LOGIN lightbox opens. LOGIN Lightbox: User has to “Become a Member” and fill out a custom registration form to get their username and password. After submission of form, the site redirects to the specific eventURL that the person started from or it takes them to /events-wix main page. This redirect was working until I went live. Now on the Get Involved page when a user logs in it does not redirect to the /events-wix page.
I THINK the api for the PROMPTS is broken. I had code that has been working for months that used wixUserLoginPrompt. Yesterday it stopped working. the API simply does not run! see my post:
I believe you have to create a members area on your site before it will work. Even if you do not require a members area you still have to create one in order for forgot password to work.