I am trying to set a authenticator for my local application. Found that I am not able to access my var outside my .then() method
var authenticated = false;
Auth.findtheUser({
}).then(user => {
verified= user.name.verified;
console.log("authenticated11", verified)
}
).catch(err => console.log(err));
console.log("authenticated", verified)
the output for authenticated11 output comes as true but not the one at the end Could anyone help me out on this. New to javascript.