Hi everyone hope you all are fine please Help me out I am working on verification email through custom sign up in lighbox when I entered data in lightbox and click submit a Lightbox must diasappear and opens a new lightbox for “thanks for registration please verify email” but a new lighbox doesnot appear and email is sent to new member but then click on link to access the site after verification the site is not opening please help me out I think there is an error in verifylink please have a look I have highlight verifylink in code if there is an another error do tell me I have shared a whole code please check and this is the link. I got on mail for verification.
https://metingoek.wixsite.com/turicum/post-register?&token=JWS.eyJraWQiOiJSc012MmV3MiIsImFsZyI6IkhTMjU2In0.eyJkYXRhIjoie1wiaWRcIjpcIjFhZjUzYWQzLWQ5OGUtNDA2NS1iYjE1LTY2MTk1MGZkYzFiNVwiLFwiY29sbGVjdGlvbklkXCI6XCI5NmQxY2FmZS1lODE3LTRhOTAtYWE4MS1jNzliNDIxNTAzOWFcIn0iLCJpYXQiOjE1NzUzOTY0NzYsImV4cCI6MTU3NTM5Njc3Nn0.PXWyzNMveVxP1easVDTYlnWWpp1Y0DIpZE7146ovvIQ
and I want this link in the email ( https://metingoek.wixsite.com/turicum ) so user click on this and enter in site please help thanks
“BACKEND CODE JSW”
import wixUsers from ‘wix-users-backend’;
export function doRegistration(Name, SurName, UserName, Email, Password, ConfirmPassword) {
return wixUsers.register(Email, Password, {
“contactInfo”: {
“Name” :Name,
“SurName” :SurName,
“UserName”: UserName,
“ConfirmPassword” : ConfirmPassword
}
} )
.then( (results) => {
// user is now registered and pending approval
// send a registration verification email
wixUsers.emailUser(‘RjUOsbU’, results.user.id, {
“variables”: {
“Name”: Name,
“verifyLink”: 'https://metingoek.wixsite.com/turicum/post-register?&token='+results.approvalToken
}
} );
} );
}
export function doApproval(token) {
// approve the user
return wixUsers.approveByToken(token)
// user is now active, but not logged in
// return the session token to log in the user client-side
.then( (sessionToken) => {
return {sessionToken, “approved”: true };
} )
. catch ( (error) => {
return {“approved”: false , “reason”: error};
} );
}
“FRONTEND CODE”
import wixUsers from ‘wix-users’;
import wixLocation from ‘wix-location’;
import wixWindow from ‘wix-window’;
import {doRegistration} from ‘backend/register’;
export function button8_click(event) {
let Name = $w(‘#input10’).value;
let SurName = $w(‘#input12’).value;
let UserName = $w(‘#input13’).value;
let Email = $w(‘#input14’).value;
let Password = $w(‘#input15’).value;
let ConfirmPassword = $w(‘#input16’).value;
doRegistration(Name, SurName, UserName, Email, Password, ConfirmPassword)
.then( () => {
console.log(“Confirmation email sent.”);
} );
}