- Login: chuyển cookies thành auth header rồi forward lên API server
- Logout: remove cookies
Slide: https://drive.google.com/drive/folders/1p6EjDFBIk9eeoMfsr9z5ufCbhe1rzU8W?usp=sharing
———
#nextjs
#authentication
#nextjs_tutorial
———
VIDEO CHAPTERS:
Made by: Hà Phạm Thị Ngọc
Cảm ơn bạn nhiều nhé! ❤️
00:00 Giới thiệu video
00:57 Fix lỗi "API resolved but no response..."
03:49 Xử lý login request
14:12 Biến đổi accessToken thành Cookies
18:35 Lấy accessToken từ Cookies cho header Authorization
22:25 Xử lý logout request
25:18 Sum up
———
Easy Frontend - Code xịn hơn mỗi ngày
🔥 Khoá học Javascript: https://course.ezfrontend.com/javascript
🎁 Khoá học ReactJS: https://course.ezfrontend.com/reactjs
🎯 Fan cứng Easy Frontend: https://www.youtube.com/channel/UCG2ovypNCpVOTFeY1YCocmQ/join
———
💰 Ủng hộ mình làm videos thì đóng góp qua MoMo/ZaloPay: 0901 309 729 nhé
———
Kết nối với mình:
- ✅ Follow facebook: https://www.facebook.com/nvhauesmn/
- 🎉 Fan page: https://www.facebook.com/learn.easyfrontend
- ❓ Group: https://www.facebook.com/groups/easyfrontend
- 💻 Github: https://github.com/paulnguyen-mn
- 💼 LinkedIn: https://www.linkedin.com/in/haunguyenmn/