{"id":19878661,"url":"https://github.com/arsath-eng/auth-testing","last_synced_at":"2026-04-13T14:32:40.338Z","repository":{"id":243903008,"uuid":"813697835","full_name":"arsath-eng/Auth-Testing","owner":"arsath-eng","description":"A comprehensive authentication solution that demonstrates best practices for implementing user authentication in Next.js applications. Features include social login with Google and GitHub, MongoDB integration for user management, protected routes, and a responsive UI built with Tailwind CSS.","archived":false,"fork":false,"pushed_at":"2024-11-01T09:37:03.000Z","size":238,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-01T02:33:12.545Z","etag":null,"topics":["authentication","authjs","github-authentication","google-authentication","mongodb","nextjs","oauth","social-login","tailwindcss","typescript","user-authentication"],"latest_commit_sha":null,"homepage":"","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/arsath-eng.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":"2024-06-11T15:10:25.000Z","updated_at":"2024-11-01T09:41:41.000Z","dependencies_parsed_at":null,"dependency_job_id":"b773f6ca-c230-4507-8d5e-d201f8f82844","html_url":"https://github.com/arsath-eng/Auth-Testing","commit_stats":null,"previous_names":["arsath-eng/auth-testing"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/arsath-eng/Auth-Testing","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arsath-eng%2FAuth-Testing","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arsath-eng%2FAuth-Testing/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arsath-eng%2FAuth-Testing/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arsath-eng%2FAuth-Testing/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/arsath-eng","download_url":"https://codeload.github.com/arsath-eng/Auth-Testing/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arsath-eng%2FAuth-Testing/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31757477,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-13T13:27:56.013Z","status":"ssl_error","status_checked_at":"2026-04-13T13:21:23.512Z","response_time":93,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["authentication","authjs","github-authentication","google-authentication","mongodb","nextjs","oauth","social-login","tailwindcss","typescript","user-authentication"],"created_at":"2024-11-12T17:06:13.695Z","updated_at":"2026-04-13T14:32:40.313Z","avatar_url":"https://github.com/arsath-eng.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 🔐 Auth.js v5 Next.js Authentication Project\n\n\u003cdiv align=\"center\"\u003e\n\n![Next.js](https://img.shields.io/badge/Next.js-000000?style=for-the-badge\u0026logo=next.js\u0026logoColor=white)\n![TypeScript](https://img.shields.io/badge/TypeScript-007ACC?style=for-the-badge\u0026logo=typescript\u0026logoColor=white)\n![MongoDB](https://img.shields.io/badge/MongoDB-4EA94B?style=for-the-badge\u0026logo=mongodb\u0026logoColor=white)\n![Auth.js](https://img.shields.io/badge/Auth.js-000000?style=for-the-badge\u0026logo=auth0\u0026logoColor=white)\n\nA comprehensive authentication solution built with Next.js and Auth.js v5, featuring multiple sign-in methods and MongoDB integration.\n\n\u003c/div\u003e\n\n## 📋 Table of Contents\n- [Overview](#-overview)\n- [Features](#-features)\n- [Prerequisites](#-prerequisites)\n- [Installation](#-installation)\n- [Project Structure](#-project-structure)\n- [Configuration](#-configuration)\n- [Running the Project](#-running-the-project)\n- [Screenshots](#-screenshots)\n- [Contributing](#-contributing)\n- [License](#-license)\n\n## 🌟 Overview\n\nThis project demonstrates a modern authentication implementation using Auth.js v5 in a Next.js application. It provides a secure and scalable solution for handling user authentication with various providers and MongoDB integration.\n\n## ✨ Features\n\n- 🔒 Secure authentication with Auth.js v5\n- 🚀 Built with Next.js 14+ and TypeScript\n- 📱 Social login integration:\n  - Google Sign-In\n  - GitHub Authentication\n- 💾 MongoDB database integration\n- 🎨 Styled with Tailwind CSS\n- 🔐 Protected routes and middleware\n- 📱 Responsive design\n\n## 🔧 Prerequisites\n\nBefore getting started, ensure you have the following installed:\n\n- Node.js (v18 or higher)\n- npm or yarn package manager\n- MongoDB Atlas account or local MongoDB installation\n- Git\n\n## 🚀 Installation\n\n1. **Clone the repository:**\n```bash\ngit clone https://github.com/arsath-eng/Auth-Testing.git\n```\n\n2. **Navigate to the project directory:**\n```bash\ncd auth-project\n```\n\n3. **Install dependencies:**\n```bash\nnpm install\n# or\nyarn install\n```\n\n## 📁 Project Structure\n\n```\nAUTH-PROJECT/\n├── 📂 .next/                  # Next.js build output\n├── 📂 action/                 # Server actions\n├── 📂 app/                    # Next.js app directory\n│   ├── api/                   # API routes\n│   ├── auth/                  # Authentication pages\n│   └── ...                    # Other app routes\n├── 📂 components/             # Reusable React components\n├── 📂 lib/                    # Utility functions and configurations\n│   ├── db.ts                  # Database connection\n│   ├── getSession.ts         # Session management\n│   └── utils.ts              # Helper functions\n├── 📂 models/                 # MongoDB models\n│   └── User.ts               # User model definition\n├── 📂 public/                 # Static assets\n├── 📄 .env                    # Environment variables\n├── 📄 auth.ts                # Auth.js configuration\n├── 📄 middleware.ts          # Next.js middleware\n└── 📄 [Other config files]   # Various configuration files\n```\n\n## ⚙️ Configuration\n\n1. **Create a `.env` file in the root directory with the following variables:**\n\n```env\n# MongoDB Connection\nMONGO_URI='mongodb+srv://your-connection-string'\n\n# Auth.js Secret\nAUTH_SECRET='your-secret-key'\n\n# GitHub OAuth\nGITHUB_CLIENT_ID='your-github-client-id'\nGITHUB_CLIENT_SECRET='your-github-client-secret'\n\n# Google OAuth\nGOOGLE_CLIENT_ID='your-google-client-id'\nGOOGLE_CLIENT_SECRET='your-google-client-secret'\n```\n\n2. **Configure OAuth Providers:**\n   - Set up OAuth applications in [GitHub Developer Settings](https://github.com/settings/developers)\n   - Configure OAuth consent in [Google Cloud Console](https://console.cloud.google.com)\n\n## 🚀 Running the Project\n\n1. **Start the development server:**\n```bash\nnpm run dev\n# or\nyarn dev\n```\n\n2. **Open your browser and navigate to:**\n```\nhttp://localhost:3000\n```\n\n## 📸 Screenshots\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"public/1-admin.png\" alt=\"admin\" width=\"800\"/\u003e\n\u003c/p\u003e\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"public/register.png\" alt=\"register\" width=\"800\"/\u003e\n\u003c/p\u003e\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"public/user.png\" alt=\"user\" width=\"800\"/\u003e\n\u003c/p\u003e\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"public/mongodb.png\" alt=\"mongodb\" width=\"800\"/\u003e\n\u003c/p\u003e\n```\n\n## 🤝 Contributing\n\nContributions are welcome! Please feel free to submit a Pull Request. For major changes, please open an issue first to discuss what you would like to change.\n\n1. Fork the repository\n2. Create your feature branch (`git checkout -b feature/AmazingFeature`)\n3. Commit your changes (`git commit -m 'Add some AmazingFeature'`)\n4. Push to the branch (`git push origin feature/AmazingFeature`)\n5. Open a Pull Request\n\n## 📄 License\n\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.\n\n---\n\n\u003cdiv align=\"center\"\u003e\n\nMade with ❤️ by Arsath\n\n\u003c/div\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Farsath-eng%2Fauth-testing","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Farsath-eng%2Fauth-testing","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Farsath-eng%2Fauth-testing/lists"}