{"id":14956781,"url":"https://github.com/thechutrain/mern-passport","last_synced_at":"2025-04-10T02:26:52.217Z","repository":{"id":80201151,"uuid":"98587020","full_name":"thechutrain/mern-passport","owner":"thechutrain","description":"A boilerplate example of using passport.js for authenticating a MERN application","archived":false,"fork":false,"pushed_at":"2020-08-20T14:59:23.000Z","size":11869,"stargazers_count":238,"open_issues_count":6,"forks_count":103,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-04-03T00:06:25.866Z","etag":null,"topics":["express","googleoauth","mongo","mongoose","nodejs","passport","react","react-router-v4"],"latest_commit_sha":null,"homepage":"https://mern-passport.herokuapp.com/","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/thechutrain.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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}},"created_at":"2017-07-27T23:15:54.000Z","updated_at":"2024-12-30T13:56:43.000Z","dependencies_parsed_at":"2023-07-12T04:15:41.610Z","dependency_job_id":null,"html_url":"https://github.com/thechutrain/mern-passport","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/thechutrain%2Fmern-passport","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thechutrain%2Fmern-passport/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thechutrain%2Fmern-passport/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thechutrain%2Fmern-passport/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/thechutrain","download_url":"https://codeload.github.com/thechutrain/mern-passport/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248143744,"owners_count":21054831,"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":["express","googleoauth","mongo","mongoose","nodejs","passport","react","react-router-v4"],"created_at":"2024-09-24T13:13:31.071Z","updated_at":"2025-04-10T02:26:52.189Z","avatar_url":"https://github.com/thechutrain.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"### MERN + Passport.js\n\u003e example MERN stack application that uses authentication\n\n* Mongo, Express, React, Node (MERN) + Passport.js for managing authentication\n* This project was bootstrapped with [Create React App](https://github.com/facebookincubator/create-react-app).\n\n## Demo\n![demo gif](./_screenshots/mern_passport_demo.gif)\n\nView the live version of this app here:\n[https://mern-passport.herokuapp.com/](https://mern-passport.herokuapp.com/)\n\n## Project Structure\n```\n|-- server/\n|  |-- server.js                            // The entry point for running the backend server locally, and main server for production\n|  |-- passport/                             // Configuration files used to connect to different machines or set settings\n|     |-- index.js                     // Overloads the passport object and defines serialize and deserialize\n|     |-- localStrategy.js            // Defines a local strategy\n|     |-- googleStrategy.js           // Defines google OAuth stratgey\n|     ....\n|  |-- db/                             \n|     |-- index.js                  // Configures the connection to the database\n|     |-- models/                   // represents data from our database, and defines schemas for each collection\n|        |-- user.js                // Schema for the User collection\n| -- src/                           // Entry for the React client side application\n```\n\n## Note\n* In order to set the google authentication up, you must register your app @ [https://console.developers.google.com](https://console.developers.google.com) \u0026 set `GOOGLE_CLIENT_ID` \u0026 `GOOGLE_CLIENT_SECRET` as environmental variables\n* In development mode (i.e. `npm run dev`), OAuth google callback is not being proxied to the google servers. Therefore in order to test the google OAuth on your local machine do the following:\n1) `npm run build`\n2) `npm run prod`\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthechutrain%2Fmern-passport","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fthechutrain%2Fmern-passport","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthechutrain%2Fmern-passport/lists"}