arrow-left

All pages
gitbookPowered by GitBook
1 of 6

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Week of October 21st

This week focuses on enhancing the e-commerce web application developed in the previous week by adding authentication, user-specific interactions, and improving overall security. The emphasis is on implementing secure user authentication and authorization while expanding React state management techniques.

hashtag
Workshops

Get Started with AWS CDKarrow-up-right

hashtag
Execute Program

  • Finish previous courses

hashtag
Topics

  • User authentication and authorization in web applications

  • Secure handling of user registration, login, and logout

  • Session management (stateless vs stateful approaches)

hashtag
Project

Continue developing the e-commerce application with the following new features:

  • Implement user authentication (registration, login, logout)

  • Create user-specific shopping carts and order history

  • Implement session persistence

hashtag
Additional Skills

  • Implementing role-based access control (for admin functionalities)

resources

These resources are helpful extra reading that may clarify or enhance concepts you’re learning in the main curriculum.

  • hashtag
    Despite the title this talk actually covers most aspects of web authentication in a very accessible way

Security threats and mitigation strategies (e.g., CSRF attacks)
  • React Router for multi-page navigation

  • Advanced React state management using Context API and useReducer

  • Linking user accounts with shopping carts and order history

  • Database security and user data protection

  • Secure the application against common web vulnerabilities
  • Enhance React state management using Context API and useReducer

  • Implement multi-page navigation using React Router

  • hashtag
    A short guide to useReducer and useContext

  • hashtag
    How to work with cookies while you are developing

  • hashtag
    Node based examples of the what and how of CSRF protection

  • hashtag
    The 8 Principles of Secure Development & Deployment set out by the National Cyber Security Center

  • JSON Web Tokens Suckarrow-up-right
    Reacts Powerful Duoarrow-up-right
    View, Edit, And Delete Cookies With Chrome DevToolsarrow-up-right
    CSRF Protection Guidearrow-up-right
    National Cyber Security Centerarrow-up-right

    Learning Outcomes

    hashtag
    Authetication

    hashtag
    React

    schedule

    week07-project04-authentication

    project

    hashtag
    Project

    Your project this week is continue work on the e-commerce shop you started last week and to add authentication and user specific interactions.

    hashtag
    Spike

    Before you start writing features you need to create a security plan. There should be a section in your README.md that describes how you will secure your app and mitigate different potential attacks.

    hashtag
    Questions to consider

    • Will you store session info in a token (stateless) or in your database (stateful)?

    • How will you check a user’s identity (authentication)?

    • How will you control what actions a user can take (authorization)?

    hashtag
    Useful resources

    hashtag
    User stories

    As a shopper, I want to:

    • Log into my account using my email and password

    • Have my user session persist, so I don't have to log in every time

    • Log out of my session

    These User Stories from last week should be updated to be linked to a shoppers account

    • Add products to a shopping cart

    • View and edit items in my shopping cart

    • Complete the checkout process to "purchase" products in my cart

    hashtag
    Stretch user stories

    As an admin, I want to:

    • Log into an admin section of the site

    • Add, edit and delete products

    • View and export reports on site analytics

    hashtag
    Acceptance Criteria

    hashtag
    Stretch

    How will you mitigate Cross-site Request Forgery (CSRF) attacks?
    See confirmation when an order is placed successfully
  • View previous orders and order history

  • Complete checkout and payments to simulate purchasing products

  • Manage user accounts
    Session-base vs token-based authenticationarrow-up-right