How to use it in koa-passport middleware?

const LocalStrategy = require("passport-local").Strategy
passport.use(new LocalStrategy(async function (username, password, done) {
  // FK: username
  let user = await userStore.getUserByName(username)
  // FK: passwordhash
  if (user && validate(password, user.hash)) {
    done(null, user)
  } else {
    log.info(`auth failed for`, username)
    done(null, false)
  }
}))
When using

koa-passport middleware, are there many done callback functions in it? where is this function implemented? Is it already realized? Or do you need to do it yourself? Read several tutorials, still do not understand how to use, more messy.
reference tutorials are as follows:
https://codeshelper.com/a/11.

https://codeshelper.com/a/11.

Mar.13,2021

done is a callback function, which means to tell the caller ( passport ) that you have finished what you want to execute, and let it continue to run its logic.
is usually called back in the form of done (err,data) .

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b31f3b-2bdda.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b31f3b-2bdda.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?