All I have now is the logic for what I want to do , a process where the user doesn’t set the password or see the password and really the password is useless… ok. The gist of this is we want to capture the users email and one other email address they provide , I will write an object subclass to save that info pertinent to that user and look it up later to make sure one email has only so many runs through this app
1 user fills in email address and click “send me authorization email”
2 moralis sends that email (or do I send ? – if I send
import sgMail from ‘@sendgrid/mail’;
// * * * * * * * * * * * code for sending email from my dapp if I have to*
export default function EmailTest(){
sgMail.setApiKey(‘SGaYI’);
const msg = {
to: ‘[email protected]’, // Change to your recipient
from: [email protected]’, // Change to your verified sender
subject: ‘Authoprization Link’,
text: ‘click on the link to authorize ownership of this email’,
html: '<strong ',
}
sgMail
.send(msg)
.then(() => {
console.log(‘Email sent’)
})
.catch((error: any) => {
console.error(error)
})
}
// * * * * * * * end * * * * * * * * * * * **
3 user opens email and clicks on the link and how does this get recognized ? Do I have to use a certain link ?
4 moralis now recognizes the owner of that email and displays the rest of the page .
So there is an example of how to do this , but I couldn’t ascertain whether or not moralis had some kind of slick link for authorization , also this process would create a new user assuming i passed useremail, password, etc . and if it got to this point where it recognized the authorization link had been clicked, that would be great, but would it be possible to set it off at logout and make them to sign in again with another authorization email each time they logged in to use the dapp.
To basically just check if it’s their email, and no password required is all I need to do really ,. Can moralis handle some of this lifting for me ? Or should I create an express server and monitor for the clicked authorization link myself in another database? [That would be a shame though]
Sorry there is no complete code example because I don’t know if I can even do this
Thanks