Skip to content

Secure identity management system built with Next.js and PostgreSQL, featuring user registration, login, two-factor authentication (2FA), and rate limiting.

Notifications You must be signed in to change notification settings

Ahtaxam/identity-tech

Repository files navigation

Next.js Identity Project

A secure identity management system built with Next.js and PostgreSQL. This project includes user registration, login, two-factor authentication (2FA), and rate limiting to enhance security and user experience.

Features

  • User Registration: Users can sign up with email and password.
  • User Login: Secure login system with JWT authentication.
  • Two-Factor Authentication (2FA): Enhanced security using 2FA for user logins.
  • Rate Limiting: Prevents abuse and protects against brute-force attacks.
  • PostgreSQL: Utilizes PostgreSQL for user data storage.

Technologies Used

  • Next.js - React framework for server-side rendering.
  • Node.js - JavaScript runtime for the backend.
  • PostgreSQL - Relational database for user data.
  • JWT - JSON Web Tokens for authentication.
  • Nodemailer - For sending emails (e.g., for 2FA).
  • Redis - Optional, for caching and rate limiting.

Getting Started

Prerequisites

  • Node.js (version 14 or above)
  • PostgreSQL (make sure to have a database setup)
  • An Upstash Redis account (if using Redis for caching/rate limiting)

Installation

  1. Clone the repository:

    git clone https://github.com/Ahtaxam/identity-tech.git
    cd identity-tech
  2. Install dependencies:

npm install
  1. Create a .env.local file in the root directory and add your environment variables:
# SMTP Configuration for sending emails
SMTP_HOST=        
[email protected]   
SMTP_PASS=your-email-password       
JWT_SECRET=
UPSTASH_REDIS_REST_URL=
UPSTASH_REDIS_REST_TOKEN=
  1. Create a .env file in the root directory Prisma orm will set database url from that
DATABASE_URL=
  1. Start the development server:
npm run dev
  1. Navigate to http://localhost:3000 in your browser.

About

Secure identity management system built with Next.js and PostgreSQL, featuring user registration, login, two-factor authentication (2FA), and rate limiting.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages