https://github.com/shadowslayer03/nextjs-authentication
A Next.js application demonstrating client-side authentication and user profile management.
https://github.com/shadowslayer03/nextjs-authentication
Last synced: over 1 year ago
JSON representation
A Next.js application demonstrating client-side authentication and user profile management.
- Host: GitHub
- URL: https://github.com/shadowslayer03/nextjs-authentication
- Owner: ShadowSlayer03
- Created: 2024-07-29T19:05:56.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2024-07-30T06:40:25.000Z (almost 2 years ago)
- Last Synced: 2025-01-21T11:29:41.543Z (over 1 year ago)
- Language: TypeScript
- Homepage: https://next-js-authentication-brown.vercel.app
- Size: 96.7 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Next.js Authentication and Profile Management
This project is a Next.js application showcasing client-side authentication and user profile management. It includes routes for login, signup, viewing user profiles, and logging out.
## Features
- **Login**: Authenticates users and grants access to the application.
- **Signup**: Allows users to create a new account.
- **Profile**: Displays user profile information such as username and email.
- **Logout**: Logs the user out and clears their session.
## Technologies Used
- [Next.js](https://nextjs.org/) - React framework for server-side rendering.
- [Axios](https://axios-http.com/) - Promise-based HTTP client for making API requests.
- [React Hot Toast](https://react-hot-toast.com/) - Simple and customizable toasts for notifications.
## Getting Started
### Prerequisites
- Node.js (>= 14.x)
- npm or Yarn
### Installation
1. **Clone the repository:**
```bash
git clone https://github.com/ShadowSlayer03/https://github.com/ShadowSlayer03/NextJS-Authentication.git
2. **Navigate to the Project Directory:**
```bash
cd NextJS-Authentication
3. **Install Dependencies**
```bash
npm install
# or
yarn install
### Running the Application
1. **Start the Development Server:**
```bash
npm run dev
# or
yarn dev
2. **Open Your Browser and Visit**
```bash
http://localhost:3000
### Usage
- Login: Navigate to /login to authenticate.
- Signup: Go to /signup to create a new account.
- Profile: Access /profile to view user details and log out.
### API Endpoints
- POST /api/auth/login - Handles user login.
- POST /api/auth/signup - Registers a new user.
- GET /api/users/profile - Retrieves user profile information.
- GET /api/users/logout - Logs out the user.
### Contributing
Feel free to open issues or submit pull requests. Contributions are welcome!