In this project I worked on a full social media crud operation, users can read all posts & post thier own posts but no one can delete or update other users posts or comments. Only admin can delete any Post, Comment or even a whole User. Each post can have comments and likes.
This project will help you set the basic steps for authenticating users securely useing:
- json web token
- bcrypt.
First thing you need to do is clone this repository to use it as a base to bulid the rest of your project on:
git clone https://github.com/ShahadAltuwijry/W08D02.git
after cloning the repository, you have to download the packages used in this project, by pasting this in your terminal:
npm i
already have your own schemas and just need the Authenticating part? you only need to:
-
Downloading bcrypt:
npm i bycrypt
-
Downloading json web token:
npm i jsonwebtoken