A minimalistic authentication system built with Express and TypeORM, utilizing JWT for handling user authentication.
- User Registration
- Email Verification (Implementation pending)
- User Login and JWT Token Generation
- Token-based Authentication with JWT
- User Profile Retrieval
- Password Reset (Implementation pending)
- User Logout
- Refresh Token Mechanism to renew access tokens
- Node.js
- TypeScript
- SQLite (For database, as the project uses SQLite)
- Clone the repository:
git@github.com:UranusLin/simple-auth-app.git
- Install dependencies:
cd simple-auth-app
pnpm install
- Start the server:
pnpm start
The server will be running on http://localhost:3000.
Endpoint: /api/signup
Method: POST
Data:
{
"email": "testasd5@asd.com",
"name": "testzz1",
"password": "asdasd"
}
Endpoint: /api/verify-email/:token
Method: GET
Endpoint: /api/login
Method: POST
Data:
{
"email": "testasd5@asd.com",
"password": "asdasd123"
}
Endpoint: /api/profile
Method: GET
Headers:
header 'authorization: Bearer <access_token>'
Endpoint: /api/reset-password
Method: POST Headers:
header 'authorization: Bearer <access_token>'
Data:
{
"password": "asdasd123"
}
- Complete pending features: Email Verification and Password Reset.
- Add support for third-party OAuth providers like Google, Facebook, etc.
- Integrate more security features like 2FA and rate limiting.