code: async function isAuthenticated({ email, password }) {
    let user = null
    try {
      user = await User.query().where('email', '=', email)
      if (user && bcrypt.compareSync(password, user[0].password)) return user[0]
    } catch (e) { }
    return null
  }
docs: Check if the user exists in database