Nexjs Starter Template for Authentication & Stripe Integration

Project completed on Jan 24, 2024

Website Repository

This is a Next.js starter template with authentication implemented using Lucia. Also includes drizzle, trpc, stripe, shadcn-ui and react-email.

typescriptnextjsluciadrizzletrpcstripetailwindcssshadcn-uireact-emailnodemailer
Nexjs Starter Template for Authentication & Stripe Integration

Motivation

Implementing authentication in Next.js, especially Email+Password authentication, can be challenging. NextAuth intentionally limits email password functionality to discourage the use of passwords due to security risks and added complexity. However, in certain projects, clients may require user password authentication. Lucia offers a flexible alternative to NextAuth.js, providing more customization options without compromising on security. This template serves as a starting point for building a Next.js app with Lucia authentication.

Lucia vs. NextAuth.js

Lucia is less opinionated than NextAuth, offering greater flexibility for customization. While Lucia involves more setup, it provides a higher degree of flexibility, making it a suitable choice for projects requiring unique authentication configurations.

Key Features

Tech Stack

Made with Astro, Tailwind CSS, and Vercel.