10 Managing user sessions
Before you begin: Join our book community on Discord
Give your feedback straight to the author himself and chat to other early readers on our Discord server (find the "rust-web-programming-3e" channel under EARLY ACCESS SUBSCRIPTION).
We now have our to-do server working. However, there is no authentication. Anybody can access the application and alter the to-do list. As we know, the internet just does not work like this. We must authenticate our users before we can allow them to alter to-do items. In this chapter, we are going to build an authentication server, and integrate it into our system so we can authenticate our users before allowing users to access the to-do items. In this chapter, we will cover the following:
- Building an auth server
- Defining our user data model
- Storing passwords
- Verifying passwords
- Creating users
- Refactoring our JWT
- Building our login API
- Adding authentication to our frontend
By the end...