Implementing your own Authentication

Once your server supports HTTP Sessions and you understand the basics of Express middleware you can start thinking of how to implement some user Authentication & Authorization.

Let’s start by creating a simple Authentication system that:

Let’s extend that to a system that:

Now for a more advanced implementation. Let’s extend the system again to one that:

Once you have mastered the above you should have a good understanding of how the Authentication process works. How do you think you should handle the Authorization process?