{"id":27753270,"url":"https://github.com/kinfe123/better-auth-nextjs-mongoose","last_synced_at":"2025-04-29T05:39:37.906Z","repository":{"id":289609231,"uuid":"970818664","full_name":"Kinfe123/better-auth-nextjs-mongoose","owner":"Kinfe123","description":null,"archived":false,"fork":false,"pushed_at":"2025-04-26T10:32:34.000Z","size":146,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-29T05:39:23.985Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://better-auth-nextjs-mongoose.vercel.app","language":"TypeScript","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/Kinfe123.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,"zenodo":null}},"created_at":"2025-04-22T15:26:08.000Z","updated_at":"2025-04-27T13:33:52.000Z","dependencies_parsed_at":"2025-04-24T06:28:25.095Z","dependency_job_id":"05ce9cf1-37b8-4a8f-a6e1-5fc91310c669","html_url":"https://github.com/Kinfe123/better-auth-nextjs-mongoose","commit_stats":null,"previous_names":["kinfe123/better-auth-nextjs-mongoose"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Kinfe123%2Fbetter-auth-nextjs-mongoose","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Kinfe123%2Fbetter-auth-nextjs-mongoose/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Kinfe123%2Fbetter-auth-nextjs-mongoose/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Kinfe123%2Fbetter-auth-nextjs-mongoose/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Kinfe123","download_url":"https://codeload.github.com/Kinfe123/better-auth-nextjs-mongoose/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251446160,"owners_count":21590667,"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-04-29T05:39:33.036Z","updated_at":"2025-04-29T05:39:37.894Z","avatar_url":"https://github.com/Kinfe123.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Better Auth Starter with Next.js and MongoDB\n\nA complete authentication solution using Better Auth, Next.js, and MongoDB.\n\n## Features\n\n- 🔐 Complete authentication system\n- 📧 Email/Password authentication\n- 🔑 Social authentication (Google, GitHub, etc.)\n- 🎯 Type-safe with TypeScript\n- 🚀 Server Actions support\n- 📱 Responsive design\n- 🔄 Session management\n- 🛡️ CSRF protection\n\n## Prerequisites\n\n- Node.js 18+\n- pnpm (recommended) or npm\n- MongoDB database\n\n## Installation\n\n1. **Clone the project**\n\n```bash\ngit clone https://github.com/Kinfe123/better-auth-nextjs-mongoose\ncd better-auth-nextjs-mongoose\n```\n\n2. **Install dependencies**\n\n```bash\npnpm install\n```\n\n3. **Setup Env variables**\n\n```bash\ncp .env.example .env\n```\n\nEdit `.env` with your configuration:\n\n```env\nDATABASE_URL=\"mongodb://....\"\nAUTH_SECRET=\"your-auth-secret\" # Generate with: openssl rand -base64 32\nGOOGLE_CLIENT_ID=\"your-google-client-id\"\nGOOGLE_CLIENT_SECRET=\"your-google-client-secret\"\nTWITTER_CLIENT_ID=\"your-twitter-client-id\"\nTWITTER_CLIENT_SECRET=\"your-twitter-client-secret\"\nGITHUB_CLIENT_ID=\"your-github-client-id\"\nGITHUB_CLIENT_SECRET=\"your-github-client-secret\"\n```\n\n5. **Run database migrations**\n\nFor MongoDB, we don't need to generate or migrate the schema.\n\n6. **Run dev server**\n\n```bash\npnpm dev\n```\n\n## Troubleshooting\n\nCommon issues and solutions:\n\n1. **Database Connection Issues**\n\n   - Verify your DATABASE_URL in .env\n   - Ensure MONGO_URL is running\n   - Check database permissions\n\n2. **Authentication Errors**\n\n   - Verify AUTH_SECRET is set\n   - Check social provider credentials\n   - Ensure proper CORS configuration\n\n3. **Session Issues**\n   - Check cookie settings\n   - Verify nextCookies plugin is enabled\n   - Ensure proper redirect handling\n\n## Contributing\n\n1. Fork the repository\n2. Create your feature branch (`git checkout -b feature/amazing-feature`)\n3. Commit your changes (`git commit -m 'Add some amazing feature'`)\n4. Push to the branch (`git push origin feature/amazing-feature`)\n5. Open a Pull Request\n\n## License\n\nThis project is licensed under the MIT License.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkinfe123%2Fbetter-auth-nextjs-mongoose","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkinfe123%2Fbetter-auth-nextjs-mongoose","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkinfe123%2Fbetter-auth-nextjs-mongoose/lists"}