Skip to content

A Next.js app with user authentication using NextAuth, supporting email/password and third-party logins (Google, LinkedIn, GitHub). Uses PostgreSQL and Drizzle ORM. Contact: [email protected]

License

Notifications You must be signed in to change notification settings

MTahaSh/next-auth-integration

Repository files navigation

🎉 Next.js Authentication Project 🚀

Welcome to the Next.js Authentication Project! This application provides user authentication using NextAuth, supporting both credential-based login/signup and third-party providers (Google, LinkedIn, GitHub). It integrates with a PostgreSQL database hosted on Vercel and uses Drizzle ORM for seamless database interactions.

📦 Features

🔐 Credential-based authentication: Users can sign up and log in using their email and password.

🌐 Third-party login: Supports authentication via Google, LinkedIn, and GitHub.

💾 Database Integration: Uses PostgreSQL for data storage.

⚙️ ORM: Drizzle ORM for handling database operations.

🛠️ Getting Started

Prerequisites

🧑‍💻 Node.js: Version 14 or higher.

🗄️ PostgreSQL Database: Set up and hosted on Vercel.

🚀 Vercel Account: For PostgreSQL hosting.

Installation

Clone the repository:

bash Copy code git clone https://github.com/MTahaSh/next-auth-integration.git cd next-auth-integration Install dependencies:

bash Copy code npm install Set up environment variables:

Create a .env file in the root directory.

Run the development server:

bash Copy code npm run dev Your application will be accessible at http://localhost:3000.

🔐 Middleware Configuration

Note: Middleware configuration is pending. For a secure application, you should configure NextAuth middleware to protect routes and manage authentication.

🚀 Usage

Sign Up: Users can register using their email or sign up via Google, LinkedIn, or GitHub. Sign In: Existing users can log in using credentials or through third-party providers.

🤝 Contributing

We welcome contributions! To contribute:

Fork the repository. Create a new branch (git checkout -b feature/YourFeature). Commit your changes (git commit -am 'Add some feature'). Push to the branch (git push origin feature/YourFeature). Create a new Pull Request. Ensure your code adheres to the project style and includes appropriate tests.

📜 License

This project is licensed under the MIT License. See the LICENSE file for details.

📧 Contact

For questions or feedback, reach out to [email protected].

Happy coding! 😊

About

A Next.js app with user authentication using NextAuth, supporting email/password and third-party logins (Google, LinkedIn, GitHub). Uses PostgreSQL and Drizzle ORM. Contact: [email protected]

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published