GithubHelp home page GithubHelp logo

mtig17 / web-sprint-challenge-authentication-and-testing Goto Github PK

View Code? Open in Web Editor NEW

This project forked from bloominstituteoftechnology/web-sprint-challenge-authentication-and-testing

0.0 0.0 0.0 168 KB

JavaScript 100.00%

web-sprint-challenge-authentication-and-testing's Introduction

Authentication and Testing Sprint Challenge

Tools

  • Node >= 16.x
  • NPM >= 8.x (update NPM executing npm i -g npm)
  • Unix-like shell (Gitbash/bash/zsh)

Project Setup

  • Fork, clone, and npm install.
  • Build your database executing npm run migrate.
  • Run tests locally executing npm test.

Project Instructions

Dad jokes are all the rage these days! In this challenge, you will build a real wise-guy application.

Users must be able to call the [POST] /api/auth/register endpoint to create a new account, and the [POST] /api/auth/login endpoint to get a token.

We also need to make sure nobody without the token can call [GET] /api/jokes and gain access to our dad jokes.

We will hash the user's password using bcryptjs, and use JSON Web Tokens and the jsonwebtoken library.

MVP

Your finished project must include all of the following requirements (further instructions are found inside each file):

  • An authentication workflow with functionality for account creation and login, implemented inside api/auth/auth-router.js.
  • Middleware used to restrict access to resources from non-authenticated requests, implemented inside api/middleware/restricted.js.
  • A minimum of 2 tests per API endpoint, written inside api/server.test.js.

IMPORTANT Notes:

  • Codegrade is running some tests you cannot see in this repo. Make sure to comply with project instructions to the letter!
  • Do not exceed 2^8 rounds of hashing with bcryptjs.
  • If you use environment variables make sure to provide fallbacks in the code (e.g. process.env.SECRET || "shh").
  • You are welcome to create additional files but do not move or rename existing files or folders.
  • Do not alter your package.json file except to install extra libraries. Do not update existing packages.
  • The database already has the users table, but if you run into issues, the migration is available.
  • In your solution, it is essential that you follow best practices and produce clean and professional results.
  • Schedule time to review, refine, and assess your work and perform basic professional polishing.

web-sprint-challenge-authentication-and-testing's People

Contributors

ladrillo avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.