{"id":13288421,"url":"https://github.com/sunilpie1997/Auth-Using-Jwt-Nodejs-Mongo","last_synced_at":"2025-03-10T06:33:30.046Z","repository":{"id":120058571,"uuid":"285228277","full_name":"sunilpie1997/Auth-Using-Jwt-Nodejs-Mongo","owner":"sunilpie1997","description":"built using nodejs,express and mongodb cloud","archived":false,"fork":false,"pushed_at":"2020-08-05T11:28:54.000Z","size":35,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-07-29T16:59:20.053Z","etag":null,"topics":["async-await","asynchronous","bcrypt","error-handling","jsonwebtoken","mongodb-cloud","nodejs","rest-api"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sunilpie1997.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-08-05T08:30:11.000Z","updated_at":"2024-07-29T16:59:20.054Z","dependencies_parsed_at":"2023-08-29T17:32:21.729Z","dependency_job_id":null,"html_url":"https://github.com/sunilpie1997/Auth-Using-Jwt-Nodejs-Mongo","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sunilpie1997%2FAuth-Using-Jwt-Nodejs-Mongo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sunilpie1997%2FAuth-Using-Jwt-Nodejs-Mongo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sunilpie1997%2FAuth-Using-Jwt-Nodejs-Mongo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sunilpie1997%2FAuth-Using-Jwt-Nodejs-Mongo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sunilpie1997","download_url":"https://codeload.github.com/sunilpie1997/Auth-Using-Jwt-Nodejs-Mongo/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":242805420,"owners_count":20187995,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["async-await","asynchronous","bcrypt","error-handling","jsonwebtoken","mongodb-cloud","nodejs","rest-api"],"created_at":"2024-07-29T16:56:48.323Z","updated_at":"2025-03-10T06:33:30.032Z","avatar_url":"https://github.com/sunilpie1997.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"***********Project description *************\n\nhttps://github.com/sunilpie1997/authenticate_using_jwt_nodejs.git\n\n*check steps.txt to get started with this*\n\nThis project shows how to  safely store password and at the same time authenticate users \nusing json web token.\n\nBenefit:a) no repeated database lookups for authenticating users in multiple requests\n            except for the first time\n\n        b)no need to maintain session on server(nodejs).\n\n\nNote:the backend nodejs server uses MONGODB CLOUD.\n    So,make sure to create your account on mongodb cloud and get connection uri,\n    after clicking 'connect' tab. \n\nNote:private_key is generated using 'puttygen' tool.\n    You can create yours.\n\n    Benifit:json web token are created after signing with this key.\n        so,that only those requests succeed that contain tokens\n        in 'Authorization' header and ****ARE SIGNED BY THIS 'private_key'****\n\n\nNote:'essentials' folder contain 2 files:\n     \n     a) db_properties-\u003econnection uri for mongodb cloud.ENTER CORRECT PASSWORD AND DATABASE_NAME after creating  user on MONGODB CLOUD.\n\n     b)auth-user-\u003econtains middleware 'authenticateToken' function to verify token and extract username\n     and execute database search for that username.\n\n     ex:  router.get('/',authenticateToken,async (req,resp)=\u003e{.......});\n\n\nNote:I have used 'bcrypt' module to hash password before storing user details in DATABASE.\n\n     and used 'bcrypt.compare' function to compare password entered by user with above 'hashed password'\n     for authentication. \n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsunilpie1997%2FAuth-Using-Jwt-Nodejs-Mongo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsunilpie1997%2FAuth-Using-Jwt-Nodejs-Mongo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsunilpie1997%2FAuth-Using-Jwt-Nodejs-Mongo/lists"}