{"id":24701737,"url":"https://github.com/hurricanemark/nodejs-passport-login","last_synced_at":"2026-04-08T20:36:26.412Z","repository":{"id":40703206,"uuid":"240987113","full_name":"hurricanemark/NodeJS-Passport-Login","owner":"hurricanemark","description":"Front-end working project implementing PassportJS with ExpressJS","archived":false,"fork":false,"pushed_at":"2022-12-12T02:00:23.000Z","size":146,"stargazers_count":0,"open_issues_count":2,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-22T04:13:13.898Z","etag":null,"topics":["bscrypt","dotenv","ejs","express-flash","express-session","expressjs","method-override","nodejs","nodemon","passport","passport-local"],"latest_commit_sha":null,"homepage":null,"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/hurricanemark.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":"FUNDING.yml","license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null},"funding":{"github":null,"patreon":null,"open_collective":null,"tidelift":null,"custom":null}},"created_at":"2020-02-17T00:09:21.000Z","updated_at":"2022-06-30T03:37:40.000Z","dependencies_parsed_at":"2023-01-27T10:30:45.730Z","dependency_job_id":null,"html_url":"https://github.com/hurricanemark/NodeJS-Passport-Login","commit_stats":null,"previous_names":[],"tags_count":0,"template":true,"template_full_name":null,"purl":"pkg:github/hurricanemark/NodeJS-Passport-Login","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hurricanemark%2FNodeJS-Passport-Login","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hurricanemark%2FNodeJS-Passport-Login/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hurricanemark%2FNodeJS-Passport-Login/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hurricanemark%2FNodeJS-Passport-Login/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hurricanemark","download_url":"https://codeload.github.com/hurricanemark/NodeJS-Passport-Login/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hurricanemark%2FNodeJS-Passport-Login/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31573788,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-08T14:31:17.711Z","status":"ssl_error","status_checked_at":"2026-04-08T14:31:17.202Z","response_time":54,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["bscrypt","dotenv","ejs","express-flash","express-session","expressjs","method-override","nodejs","nodemon","passport","passport-local"],"created_at":"2025-01-27T05:25:20.109Z","updated_at":"2026-04-08T20:36:26.396Z","avatar_url":"https://github.com/hurricanemark.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Project: Node.js Passport Login \n\n## Title: PassportLogin\n\n## Description\n\nThis code is a bare minimum structure of Login using PassportJS.  It demonstrates the implementation of passport-local, express-session with expressJS, NodeJS, EJS.  It is without CSS.  It is without the backend database, content management.  \n\nWhere to go from here?  Obviously, we could employ styling and data modelign, then on to JWT.\n\n[x] PassportJS  \n[ ] JWT  \n[ ] Style CSS  \n[ ] Modeling using MongoDB Atlas  \n\n\n## Screenshots\n\n**Register**  \n![register](https://github.com/hurricanemark/NodeJS-Passport-Login/blob/master/assets/img/register.PNG)\n\n---\n\n**Login**  \n![Login](https://github.com/hurricanemark/NodeJS-Passport-Login/blob/master/assets/img/login.PNG)\n\n---\n\n**Index**  \n![index page](https://github.com/hurricanemark/NodeJS-Passport-Login/blob/master/assets/img/indexpage.PNG)\n\n## References\n\n[EJS](https://ejs.co/#about) *Embedded JavaScript templating*   \n\n[ExpressJS](https://expressjs.com/) *Fast, unopinionated, minimalist web framework for Node.js*  \n\n[nodejs](https://nodejs.org/en/) *JavaScript runtime built on Chrome's V8 JavaScript engine*  \n\n[bscript or bscryptjs](https://passwordhashing.com/BCrypt)\n*bcrypt is a password hashing function designed by Niels Provos and David Mazières, based on the Blowfish cipher, and presented at USENIX in 1999.*\n\n[passportJS](http://www.passportjs.org/packages/passport-local/) *Authentication middleware for Node.js*  \n\n\n# Getting Started\n\n**Environment** `vscode`\nYou need to  install extension for \nEJS Language Support!  EJS is the Embedded JavaScript templating language that lets you generate HTML markup with plain JavaScript.\n\n`npm init`\n\n`npm i express ejs`\n\n`npm i --save-dev nodemon dotenv`\n\n*bcrypt is used for hashing passwords, ...*\n\n`npm i bcrypt`  \n\n*passport passport-local are used for password authentication.  express-session is for local session, express-flash displays invalid authentication messages*\n\n\n`npm i passport passport-local express-session express-flash`\n\n*Logic for passport,...,express-flash will be written in passport-config.js*\n\n\n`npm i method-override`\n\n*method-override alternates POST so we can call app.delete to implement logout*\n\nThen,  \n\n- Create the following files:  .env .gitignore\n\n- Insert into .gitignore\n\n```\n.env\n\nnode_modules\n```  \n\n- Insert into .env  \n\n```\nSESSION_SECRET=your_secret_could_be_anything_here\n```  \n\n- Edit package.json\n\n`\"scripts\": { \"devStart\": \"nodemon server.js\" }`\n\n- To start the express server on the terminal:\n\n`npm run devStart`\n\n- Open browser to http://localhost:3000\n\n\n## Docker Build, Deploy, and Run\n\nVerify that the application is running after you cloned it.  Hint, create *.env* file\nand enter the followings:\n\n```\nNODE_ENV=development\nSESSION_SECRET=Anything you desirer here\nPORT=3322\n```\n\n### Build Docker\n\nReplace 'hurricanemark' with your dockerhub's username\n\n```\ndocker build -t hurricanemark/nodejs-passport-login:1.0 .\n```\n\nThen, run the application:\n\n```\nnpm start\n```\n\n**List docker image**\n\nFind the IMAGE ID of the newly build docker image\n\n```\ndocker image ls\n```\n\n### Run Docker\n\n```\ndocker run -p 9999:8080 \u003cIMAGE_ID\u003e\n```\n\nExpected console output:\n```\n\u003e node server.js\n\nListening on port 3322\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhurricanemark%2Fnodejs-passport-login","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhurricanemark%2Fnodejs-passport-login","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhurricanemark%2Fnodejs-passport-login/lists"}