i had to make my own function and build the confirmation link by myself. Not sure if this is the best apporach but it is wokring, here is the cloud function iāve put together if someone needs it, you are wellcome.
you need to remove the template id from the serverās settings for verification, this way it doesnāt sent an autmate email each time a user is created in the db, and also you can say āhi nicknameā to your users (something that was not possible with the autmated email)
Moralis.Cloud.define("sendWelcomeEmail", (request) => {
const logger = Moralis.Cloud.getLogger();
const server_url ="https://yourserverurl:2053/server";
const appid ="your_app_id_here";
const algo = JSON.stringify(request.user);
let substring = algo.substring( algo.search("_email_verify_token"), algo.search("_email_verify_token") + 48);
let sub = substring.split(":");
const verify_token = sub[1].replaceAll('"', '');
logger.info("formed link: " + server_url + "/apps/" + appid + "/verify_email?token=" + verify_token +"&username=" + request.params.email);
Moralis.Cloud.sendEmail({
to: request.params.email,
templateId: "d-YOUR_TEMPLATE_ID_HERE",
dynamic_template_data:{name: request.params.name, link: server_url + "/apps/" + appid + "/verify_email?token=" + verify_token +"&username=" + request.params.email},
})
});
Moralis.Cloud.afterSave(Moralis.User, async (request) => {
// code here
return "user updated";
});