Chapter 9. Adding a User Login and API Authentication with Passport
In the last chapter, we allowed the user to save their favorite Vuebnb listings. This feature was only implemented in the frontend app though, so if the user reloaded the page their selections would be lost.
In this chapter, we'll create a user login system and persist saved items to the database so they can be retrieved after a page refresh.
Topics covered in this chapter:
- Setting up a user login system utilizing Laravel's built-in authentication features
- Creating a login form with CSRF protection
- Using Vuex actions for asynchronous operations in the store
- A brief introduction to the OAuth protocol for API authentication
- Setting up Laravel Passport to allow authenticated AJAX requests