Skip to content

πŸ”’ Authentication Application With Many Features using Nest.js and Next.js

Notifications You must be signed in to change notification settings

huseynovvusal/auth-app-nest-next

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

52 Commits
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Auth App πŸš€

This project is an authentication application that includes features such as login/signup, forgot password, email verification, session management, and Google OAuth authentication. It uses Nest.js as the backend framework and Next.js as the frontend framework.

Features ✨

  • Login/Signup: User authentication and new user registration with email and password.
  • Forgot Password: Password recovery via email.
  • Email Verification: Verification of user email addresses.
  • Session Management: Handling user sessions securely.
  • Google OAuth: Authentication using Google accounts.

Technologies Used πŸ› οΈ

  • Backend Framework: Nest.js
  • Frontend Framework: Next.js
  • Database: PostgreSQL
  • ORM: TypeORM
  • Authentication: JWT (JSON Web Tokens), Google OAuth
  • Styling: Tailwind CSS
  • State Management: Zustand

Installation πŸ“₯

  1. Clone the repository:
    git clone <repository-url>
  2. Navigate to the project directory:
    cd auth-app-nest-next
  3. Install backend dependencies:
    cd server
    npm install
  4. Install frontend dependencies:
    cd client
    npm install

Usage πŸš€

  1. Start the backend server:
    cd server
    npm run start:dev
  2. Start the frontend server:
    cd client
    npm run dev

Session Management Details πŸ”

The session management in this application is implemented using JWT (JSON Web Tokens) for access and refresh tokens, which are stored in cookies. Additionally, users have the ability to view and manage the devices that are currently logged into their account.

  • JWT Access & Refresh Tokens: Securely manage user sessions by issuing access tokens for authentication and refresh tokens for obtaining new access tokens without re-authentication.
  • Device Management: Users can see a list of devices that are currently logged into their account and manage these sessions by logging out from specific devices if needed.