{"id":25228886,"url":"https://github.com/gourabofficial/mern-auth","last_synced_at":"2026-04-06T08:01:45.122Z","repository":{"id":276832194,"uuid":"929961627","full_name":"gourabofficial/MERN-Auth","owner":"gourabofficial","description":"MERN Authentication . ","archived":false,"fork":false,"pushed_at":"2025-02-19T15:34:16.000Z","size":310,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-01-03T19:37:25.710Z","etag":null,"topics":["cors","jwt-authentication","nodejs","react"],"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/gourabofficial.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":"2025-02-09T19:45:11.000Z","updated_at":"2025-02-19T15:38:03.000Z","dependencies_parsed_at":"2025-02-10T18:32:50.158Z","dependency_job_id":null,"html_url":"https://github.com/gourabofficial/MERN-Auth","commit_stats":null,"previous_names":["gourabofficial/mern-auth"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/gourabofficial/MERN-Auth","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gourabofficial%2FMERN-Auth","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gourabofficial%2FMERN-Auth/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gourabofficial%2FMERN-Auth/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gourabofficial%2FMERN-Auth/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gourabofficial","download_url":"https://codeload.github.com/gourabofficial/MERN-Auth/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gourabofficial%2FMERN-Auth/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31464102,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-05T21:22:52.476Z","status":"online","status_checked_at":"2026-04-06T02:00:07.287Z","response_time":112,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["cors","jwt-authentication","nodejs","react"],"created_at":"2025-02-11T10:46:12.500Z","updated_at":"2026-04-06T08:01:45.055Z","avatar_url":"https://github.com/gourabofficial.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# MERN Authentication\n\nThis is a MERN (MongoDB, Express, React, Node.js) stack application for user authentication.\n\n## Features\n\n- User registration\n- User login\n- User logout\n- JWT-based authentication\n- Password hashing with bcrypt\n- Environment variable configuration\n\n## Prerequisites\n\n- Node.js\n- MongoDB\n- npm or yarn\n\n## Installation\n\n1. Clone the repository:\n\n    ```bash\n    git clone https://github.com/yourusername/MERN-Auth.git\n    cd MERN-Auth\n    ```\n\n2. Install dependencies:\n\n    ```bash\n    npm install\n    ```\n\n    or\n\n    ```bash\n    yarn install\n    ```\n\n3. Create a `.env` file in the root directory and add the following environment variables:\n\n    ```plaintext\n    MONGODB_URI=your_mongodb_uri\n    JWT_SECRET=your_jwt_secret\n    NODE_ENV=development\n    ```\n\n4. Start the server:\n\n    ```bash\n    npm start\n    ```\n\n    or\n\n    ```bash\n    yarn start\n    ```\n\n## API Endpoints\n\n### Register\n\n- **URL:** `/api/auth/register`\n- **Method:** `POST`\n- **Body:**\n    ```json\n    {\n      \"name\": \"John Doe\",\n      \"email\": \"john@example.com\",\n      \"password\": \"password123\"\n    }\n    ```\n- **Response:**\n    ```json\n    {\n      \"success\": true,\n      \"message\": \"User Registered Successfully\"\n    }\n    ```\n\n### Login\n\n- **URL:** `/api/auth/login`\n- **Method:** `POST`\n- **Body:**\n    ```json\n    {\n      \"email\": \"john@example.com\",\n      \"password\": \"password123\"\n    }\n    ```\n- **Response:**\n    ```json\n    {\n      \"success\": true,\n      \"message\": \"User Logged in Successfully\"\n    }\n    ```\n\n### Logout\n\n- **URL:** `/api/auth/logout`\n- **Method:** `POST`\n- **Response:**\n    ```json\n    {\n      \"success\": true,\n      \"message\": \"Logged out Successfully\"\n    }\n    ```\n\n## License\n\nThis project is licensed under the MIT License.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgourabofficial%2Fmern-auth","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgourabofficial%2Fmern-auth","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgourabofficial%2Fmern-auth/lists"}