In the last episode, you saw the core code needed for implementing authentication with the “iam” module in Node and Express. But having a login isn't quite enough. There are several questions left that need answers:
- How do you know you're logged in? The site isn't showing any user name or other info.
- How do you get a basic authorization scheme in place to make sure visitors must log in to the site?
- What about logout? If you can log in, you should be able to log out as well.
In this episode, then, you'll find the answers to these questions, and more – with a tip of the hat to a more complete authorization library, while keeping the current authorization needs very simple, based on the existing iam module.