{"id":24953343,"url":"https://github.com/codexparas/credentials-auth-nextjs","last_synced_at":"2025-03-28T19:45:55.800Z","repository":{"id":218666088,"uuid":"747040647","full_name":"CodexParas/credentials-auth-nextjs","owner":"CodexParas","description":"Kickstart your Next.js project with this authentication-ready starter template. Utilizing Mongoose, Tailwind CSS, bcryptjs, and React Toastify, it includes a customizable authentication flow using Next Auth with credentials. Clone, configure, and build securely with this robust foundation.","archived":false,"fork":false,"pushed_at":"2024-04-03T08:19:52.000Z","size":140,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-03T03:34:16.884Z","etag":null,"topics":[],"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/CodexParas.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}},"created_at":"2024-01-23T06:23:45.000Z","updated_at":"2024-04-05T13:18:12.000Z","dependencies_parsed_at":"2024-01-23T07:42:50.047Z","dependency_job_id":null,"html_url":"https://github.com/CodexParas/credentials-auth-nextjs","commit_stats":null,"previous_names":["codexparas/credentials-auth-nextjs"],"tags_count":0,"template":true,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CodexParas%2Fcredentials-auth-nextjs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CodexParas%2Fcredentials-auth-nextjs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CodexParas%2Fcredentials-auth-nextjs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CodexParas%2Fcredentials-auth-nextjs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/CodexParas","download_url":"https://codeload.github.com/CodexParas/credentials-auth-nextjs/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246093097,"owners_count":20722395,"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":"2025-02-03T03:34:47.696Z","updated_at":"2025-03-28T19:45:55.773Z","avatar_url":"https://github.com/CodexParas.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"## Getting Started\n\nFollow these steps to set up the project on your local machine:\n\n1. **Clone the Repository:**\n\n   ```bash\n   git clone https://github.com/CodexParas/credentials-auth-nextjs.git\n   ```\n\n2. **Install Dependencies:**\n\n   ```bash\n   cd credentials-auth-nextjs\n   npm install\n   ```\n\n3. **Create Environment Variables:**\n\n   Duplicate the `.env.sample` file and rename it to `.env.local`. Fill in the following values:\n\n   ```env\n   MONGODB_URL=your-mongodb-connection-string\n   NEXTAUTH_URL=your-nextauth-url\n   NEXTAUTH_SECRET=your-nextauth-secret\n   ```\n\n   Replace `your-mongodb-connection-string`, `your-nextauth-url`, and `your-nextauth-secret` with your actual MongoDB connection string, NextAuth URL, and NextAuth secret, respectively.\n\n4. **Configure MongoDB:**\n\n   Update the MongoDB connection string in the `config/dbConfig.js` file with your own database connection details.\n\n5. **Run the Application:**\n\n   ```bash\n   npm run dev\n   ```\n\n   Open [http://localhost:3000](http://localhost:3000) in your browser to see the app.\n\n## Usage\n\nThis starter includes a basic authentication setup using Next Auth with credentials. Customize and extend the authentication flow according to your application's requirements.\n\n- Authentication routes can be found in the `src/app/api/auth` directory.\n- User model and authentication logic are in the `src/models/userModel.js` file.\n- Protected routes are demonstrated in the `src/middleware.js` file.\n\nFeel free to build on top of this starter and add more features to suit your project needs.\n\n## Additional Notes\n\n- Make sure to keep sensitive information such as API keys and secrets secure. Use environment variables to manage them.\n- Refer to the documentation of each library (Next Auth, Mongoose, Tailwind CSS, bcryptjs, React Toastify) for more in-depth information.\n\nHappy coding!","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodexparas%2Fcredentials-auth-nextjs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcodexparas%2Fcredentials-auth-nextjs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodexparas%2Fcredentials-auth-nextjs/lists"}