The verification is handled by Moralis itself. The link will be unique for each email being sent and will be embedded in the email. You need not manually work on it.
Happy BUIDLing !
The verification is handled by Moralis itself. The link will be unique for each email being sent and will be embedded in the email. You need not manually work on it.
Happy BUIDLing !
@malik you guys should update the documentation to include that requestEmailVerification
needs to be explicitly called. From the docs, it seems like it says that the verification email will automatically be sent after calling signUp
Also, it seems that for people using webhooks like myself, the requestVerificationEmail
function is not present in moralis/node
:
Is there a chance this can be fixed? It’d be great that emails get automatically sent every time the user email
field changes.
I’m on "moralis": "^0.0.42"
.
For what it’s worth, I did check the JS in the node_modules
and the function is indeed not there.
If you make a new node project with npm init --yes
and npm install --save moralis
you don’t find that function there?
I don’t. And if I run the code the program crashes saying requestEmailVerification
is not a function. Are you able to confirm this on your end too?
These are the only references to requestEmailVerification
in the bundle:
I don’t see it included in moralis/node
there.
I tested this now:
const Moralis = require('moralis/node')
console.log(Moralis.User.requestEmailVerification)
=>
[Function: requestEmailVerification]
Hmmm - strange. Thanks for confirming. I’ll see what’s going on on my end and report what’s up.
Ok, just verified two things:
requestEmailVerification
does not send the email. I verified that requestPasswordReset
does indeed work, so that ruled out that my email config was incorrect.Any ideas?
you may need to add the email as parameter based on this response: Moralis is not sending email verification to users
Having this same issue as well trying to verify users with email.
I’m passing the email as a param already.
@acorredor, from my tests everything works ok, I received an email automatically when I set the email to my user, and also I received an email when I used
await Moralis.User.requestEmailVerification(user_email)
What it happened for me was that an original email sent as test was in Spam folder and not in Inbox folder.
Any idea why email verification code:
async function verify(){
let user = Moralis.User.current(); let userEmail = user.attributes.email; await Moralis.User.requestEmailVerification(email).then(() => { alert("Email Verification Sent"); }).catch((error) => { alert("Error: " + error.message); }); }
Is giving out this error:
Error: An appName, publicServerURL, and emailAdapter are required for password reset and email verification functionality.
you may need to set up sendgrid for your Moralis Server, api key and templates
Where do I do that from?, are these located in Moralis Dashboard? or Moralis Admin?.