Skip to content

Instantly share code, notes, and snippets.

@harrisonmalone
Last active July 1, 2019 04:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save harrisonmalone/3324b60be0d4c2df7cada9c65b6a4f07 to your computer and use it in GitHub Desktop.
Save harrisonmalone/3324b60be0d4c2df7cada9c65b6a4f07 to your computer and use it in GitHub Desktop.

Countries auth challenge

challenge #1

  • add authentication to your own countries react apps
  • protect all views, unless a user has logged in they can't view anything, implement what we did in the lecture
  • add a register page so users can create accounts
  • add a logout button on every view (destroy the localstorage token)

challenge #2 (optional)

  • create a "where have you been in the world" app
  • users should be able to navigate to a countries page and click on a button to add that country to their list of visited countries
  • users should then be able to go to a view at http://localhost:3000/visited-countries that lists all their visited countries
  • you'll need to think about nested data structures for this app, a user could have an array of visitedCountry documents
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment