{"id":18451489,"url":"https://github.com/trasherdk/hyper-express-sessions-passport-local","last_synced_at":"2025-04-19T14:00:10.712Z","repository":{"id":42536362,"uuid":"443310625","full_name":"trasherdk/hyper-express-sessions-passport-local","owner":"trasherdk","description":null,"archived":false,"fork":false,"pushed_at":"2023-03-13T21:45:46.000Z","size":1709,"stargazers_count":3,"open_issues_count":1,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-02-16T14:07:25.507Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"CSS","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"unlicense","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/trasherdk.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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":"2021-12-31T09:41:40.000Z","updated_at":"2023-03-04T04:35:38.000Z","dependencies_parsed_at":"2024-11-06T07:30:38.089Z","dependency_job_id":"0a2d7ec6-d20a-4d7a-a74c-d18449eb1c97","html_url":"https://github.com/trasherdk/hyper-express-sessions-passport-local","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/trasherdk%2Fhyper-express-sessions-passport-local","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/trasherdk%2Fhyper-express-sessions-passport-local/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/trasherdk%2Fhyper-express-sessions-passport-local/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/trasherdk%2Fhyper-express-sessions-passport-local/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/trasherdk","download_url":"https://codeload.github.com/trasherdk/hyper-express-sessions-passport-local/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249494499,"owners_count":21281661,"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":[],"created_at":"2024-11-06T07:28:49.848Z","updated_at":"2025-04-18T12:39:54.796Z","avatar_url":"https://github.com/trasherdk.png","language":"CSS","funding_links":[],"categories":[],"sub_categories":[],"readme":"This example illustrates how to use [Express](https://expressjs.com) 4.x and\n[Passport](https://www.passportjs.org) to sign users in with a username and\npassword.  Use this example as a starting point for your own web applications.\n\n## Quick Start\n\nTo get started with this example, clone the repository and install the\ndependencies.\n\n```bash\n$ git clone https://github.com/passport/express-4.x-local-example.git\n$ cd express-4.x-local-example\n$ npm install\n```\n\nStart the server.\n\n```bash\n$ npm start\n```\n\nNavigate to [`http://localhost:3000`](http://localhost:3000).\n\n## Overview\n\nThis example illustrates how to use [Passport](https://www.passportjs.org) and\nthe [`passport-local`](https://www.passportjs.org/packages/passport-local/)\nstrategy within an [Express](https://expressjs.com) application to sign users in\nwith a username and password.\n\nThe example builds upon the scaffolding created by [Express generator](https://expressjs.com/en/starter/generator.html),\nand uses [EJS](https://ejs.co) as a view engine and plain CSS for styling.  This\nscaffolding was generated by executing:\n\n```\n$ express --view ejs express-4.x-local-example\n```\n\nThe example uses [SQLite](https://www.sqlite.org) for storing user accounts.\nSQLite is a lightweight database that works well for development, including this\nexample.\n\nAdded to the scaffolding are files which add authentication to the application.\n\n* [`boot/db.js`](boot/db.js)\n\n  This file initializes the database by creating the tables used to store user\n  accounts and credentials.\n  \n* [`boot/auth.js`](boot/auth.js)\n\n  This file initializes Passport.  It configures the password strategy with a\n  `verify` callback.  The callback verifies the password by finding the user\n  account in the database.  If the account is found, the callback hashes the\n  password entered and compares it to the hashed password stored in the\n  database.  If the comparison is equal, the user is authenticated.\n  \n  This file also supplies the serialization functions used for session\n  management.\n\n* [`routes/auth.js`](routes/auth.js)\n\n  This file defines the routes used for authentication.  In particular, there\n  are two routes used to authenticate with a username and password:\n  \n  - `GET /login`\n  \n    This route renders a page that prompts the user to enter their username and\n    password.\n  \n  - `POST /login/password`\n  \n    This route authenticates the user using their username and password.\n\n* [`routes/users.js`](routes/users.js)\n\n  This file defines the routes used for registration.  In particular, there are\n  two routes used to create an account:\n  \n  - `GET /users/new`\n  \n    This route renders a page that prompts the user to enter the information\n    needed to register an acccount.  This information consists of their name,\n    preferred username, and password.\n  \n  - `POST /users`\n  \n    This route creates a new account using the information entered by the user.\n    The password is first hashed and stored in hashed format.\n\n## License\n\n[The Unlicense](https://opensource.org/licenses/unlicense)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftrasherdk%2Fhyper-express-sessions-passport-local","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftrasherdk%2Fhyper-express-sessions-passport-local","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftrasherdk%2Fhyper-express-sessions-passport-local/lists"}