Last updated: Mon Dec 6 14:50:22 PST 2021

CS 124-Lab 5

In this lab, you'll update lab 4 to: Make sure that you use authentication/authorization to ensure that no user can view/change the data of another user (except for shared lists).

You will need to create your own Firestore database (Firestore quickstart) for which you'll need a (non-HMC) Google login. You'll need to set up rules for that database (Authentication/Authorization lab may be useful).

Make sure to include the database rules as part of the Git repository (so that I can verify the rules ensure the correctness as specified above).

Hints

Getting started

As you are doing the implementation, you will need to change parts of the design. That's OK, but the changes and rationale should be documented in design.md.

Your work should be done in a branch named lab5.

$ cd ~/cs124/lab
$ git checkout lab4 	
$ git checkout -b lab5 	# creates a new branch named lab3 based on lab2 and checks it out
$ git push -u origin lab5 # pushes the new branch to the origin

Hand-In Procedure

You will turn in your labs using git and GitHub.

$ git commit -am "my last commit"
[lab1 c2e3c8b] my last commit
 2 files changed, 18 insertions(+), 2 deletions(-)

$ git push

Deploy your app to GitHub Pages so that https://{GITHUBUSERNAME}.github.io/cs124/ shows your running application.

You will then need to go to GitHub.com and create a pull request whose base is lab4 and whose compare is lab5. That is, you'll be submitting the changes between lab4 and lab5. This pull request should show, for example, changes between the lab4 and lab5 design.md rather than showing the entirety of the design.md as new.

Detailed instructions on creating a pull request on GitHub

  1. Go to Pull Request tab on GitHub
  2. Click on "New pull request".
  3. Select 'lab4' as the base branch and 'lab5' as the compare branch .
  4. Verify that the commits that are chosen are correct, and that the code that is shown as different is correct.
  5. Click on "Create pull request".
  6. In the right-hand column, click on the gear icon next to Reviewers
  7. Type "nrhodes-hmc" and click on the GitHub name in the list below.
  8. Click on "Create pull request".

Deliverables

You'll submit a GitHub branch named lab3 containing, at the top level,: Before creating your pull request, go to GitHub and verify that: