Giter Club home page Giter Club logo

next-auth's Introduction

Nextjs 14 user auth

Overview

A web application built with Next.js 14, featuring a robust set of authentication and user management functionalities. It enables users to register either through traditional email and password or via Google authentication. The application employs a MongoDB database to securely store user registration data.

Server actions are used to implement api. Email verification and forgot password functionalities are also implemented using Resend and node mailer. It's a comprehensive application allowing user to register and login with ease. Error handling is implemented with Sonner for toast notifications.

Features

User Registration

  • Users can register with their email and password.
  • Email verification is implemented for added security.
  • Verification emails are sent using Node Mailer and Resend.

Forgot Password

  • Users can reset their password using the "Forgot Password" feature.
  • Password reset links are sent to the user's email and changes are reflected in DB in realtime.

Google Authentication

  • Users can register or log in using Google authentication.
  • Integration with Google OAuth for a seamless user experience.

Next.js 14 and App Router

  • Developed with Next.js 14.
  • Utilizes the Next.js App Router for efficient client-side navigation.

MongoDB Integration

  • User registration data is stored in MongoDB.
  • Passwords and sensitive information are securely hashed.

Tailwind CSS

  • Styling is done using Tailwind CSS for a responsive and clean UI.

Intermediate Page

  • New users are redirected to an intermediate page after authentication.
  • Provides a smooth onboarding experience.

Setup Instructions

  1. Clone the repository:

    git clone https://github.com/iavinash73/next-auth.git
    
  2. Install required packages:

    npm i
    
  3. Get the .env variables necessary for the project:

    MONGODB_URI=
    NEXTAUTH_SECRET=
    GOOGLE_ID=
    GOOGLE_SECRET=
    NEXTAUTH_URL= 
    RESEND_API_KEY=
    
  4. Run the project in local:

    npm run dev
    
    

Deploy on Vercel

The easiest way to deploy your Next.js app is to use the Vercel Platform from the creators of Next.js.

Check out our Next.js deployment documentation for more details.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.