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.
- 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.
- 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
- Clone the repository:
git clone <repository-url>
- Navigate to the project directory:
cd auth-app-nest-next
- Install backend dependencies:
cd server npm install
- Install frontend dependencies:
cd client npm install
- Start the backend server:
cd server npm run start:dev
- Start the frontend server:
cd client npm run dev
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.