node.jstypescriptexpresssessionsession-management

Session management in Typescript with express


Hello I am new to typescript. And want to know how session is managed in Typescript. Like session initialisation, storing user data in session etc etc. So if any one having tutorial or documention on that you can share.

Thank you


Solution

  • You can do it all manually or use library. If you are doing it first time in your life I recommend to write it from scratch, to learn, but on production let use package.

    For example:

    https://www.passportjs.org/

    It has:

    You can start from reading this article:

    https://medium.com/@sherief.elsowiny/how-to-build-a-session-authentication-system-in-express-typescript-c48d561d7178

    and create new more specific question if something will be unclear.