This is a Next.js project that integrates Discord authentication using NextAuth for a seamless login experience with Discord credentials.
- Discord OAuth2 integration with NextAuth.
- Fetching user guild membership and roles from the Monad Discord server.
- Environment-based configuration for secure and flexible deployment.
- Node.js 20.x or later
- pnpm
- Clone the repository:
git clone https://github.com/your-repository/monad-discord-auth.git
- Navigate to the project directory:
cd monad-discord-auth
- Install dependencies using pnpm (recommended for consistency with the project setup):
pnpm install
- Set up your
.env
file based on the.env.example
provided in the repository:AUTH_SECRET=your_auth_secret_here NEXTAUTH_URL=http://localhost:3000 DISCORD_ID=your_discord_id_here DISCORD_SECRET=your_discord_secret_here MONAD_GUILD_ID=your_MONAD_GUILD_ID_here
- Run the development server:
Open http://localhost:3000 with your browser to see the result.
pnpm dev
Deploy your Next.js app using Vercel, the creators of Next.js, which provides a simple and effective way to deploy your application with zero configuration.
Contributions are welcome! Please feel free to submit a pull request.
This project is licensed under the MIT License - see the LICENSE.md file for details.