Prover (client) doesn't need to share the information he has (password in this case) to Verifier (server in this case) to verify his identity
Project Based on paper : A survey of zero knowledge proof for authentication
Registering User - A key is generated dynamically by using email and password and is encrypted using SHA-256 algorithm
Signin Route - SHA-256 algorithm creates same hash for two equal given strings
Hence, in case of even a change in capitalisation of a letter would generate a all new hash and thus will throw an error
- Make sure you have Node.js version >= 13.
Clone the repository into your system and open the directory and run this command to install all dependencies
npm install
To customise port of webapp, create .env
- Create YOUR_PORT
- Assign the port value of your choice in YOUR_PORT
- Access .env parameters in app.js using dotenv.config()
- Access Port value usign process.env.YOUR_PORT and provide it to app.listen()
To customise port of react-app, open package.json
- Find Start under Scripts object
- Assign the port value of your choice in set PORT //default port value is 3000
"scripts": {
"start": "set PORT=8000 && react-scripts start"
}
- If you want to proceed with default port then skip above steps and do
"scripts": {
"start": "react-scripts start"
}
To access resources available in backend running on different port (while developing in localhost) proceed with either of following 2 steps:
- Make sure to run command npm i cors before using in app.js file
app.use(cors())
- Go to package.json of your frontend folder and add the following script :
"proxy" : "http://your.ip.address:YOUR_PORT"
Open Project Folder and Frontend directory in command prompt and run following command in both directories
npm start