Ok, the problem is you cannot pass a value to emailStatus coming from the .then method:
I have encountered this problem before but I forgot how I got to the bottom of it. This post should help.
varemailStatus;// You cannot pass a value here_verifyEmail(User).then(asyncres=>{// Coming from here, the value inside this scope is only contained // inside this scope correct me if I'm wrong.emailStatus=awaitres;console.log(`res: ${res}`);});
I think there are two ways to solve this problem,
The first one requires you to add an async in _verifyUser:
The second one is a little bit experimental because i don't know if it will work:
Edit: Come to think of it this will not work, it will only return a promise I think.
Ok, the problem is you cannot pass a value to emailStatus coming from the .then method:
I have encountered this problem before but I forgot how I got to the bottom of it.
This post should help.
I think there are two ways to solve this problem,
The first one requires you to add an async in _verifyUser:
The second one is a little bit experimental because i don't know if it will work:
Edit: Come to think of it this will not work, it will only return a promise I think.