Suggestion for Quality Assurance - serialization - theory

suggestion
While i was working on the serialization challenge i felt a little bit lost because i understood what serialization did, but i didn’t understood when or how it was applied.
It could be helpful to add an explanation that serialization is automatically applied by passport during authentication, and that deserialization is applied by passport before every request in the passport.session() middleware so it goes like this:

  1. we do a request.
  2. passport.sesion() middleware is executed, it deserializes data (and also adds the user’s data to req.user).
  3. app.route('/whatever').httpMethod(callback) is executed and we have our data deserialized in req.user.

It could add a little bit of clarity.

Challenge: Implement the Serialization of a Passport User

Link to the challenge:

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.