Pregunta de entrevista de PureCode Software

How would you implement user authentication middleware in a Node.js application?