Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/vinuvasudev/bits-to-do-app-auth-service
https://github.com/vinuvasudev/bits-to-do-app-auth-service
Last synced: about 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/vinuvasudev/bits-to-do-app-auth-service
- Owner: vinuvasudev
- License: mit
- Created: 2024-04-07T13:31:50.000Z (9 months ago)
- Default Branch: main
- Last Pushed: 2024-04-07T13:51:47.000Z (9 months ago)
- Last Synced: 2024-04-07T14:35:54.872Z (9 months ago)
- Language: JavaScript
- Size: 3.96 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# BITS TODO App Authentication API
This is a simple Node.js application that provides authentication functionality including login, logout, and token verification APIs using MySQL database and Sequelize ORM.
## Features
- User authentication with JWT (JSON Web Tokens)
- Secure password storage using bcrypt hashing
- Token-based authentication for protected routes
- MySQL database integration with Sequelize ORM
- Simple API endpoints for login, logout, and token verification## Requirements
- Node.js
- MySQL
- npm or yarn package manager## 1. Install dependencies:
`cd todo-auth-service`
`npm install`## 2. Set up MySQL database:
Create a database for the application
Update the database configuration in config/config.js## 3. Run the application:
`npm start`
You can now access the API endpoints at http://localhost:3000
## API Endpoints
POST /login: Authenticate user and generate JWT token
POST /logout: Invalidate current session (token)
GET /check-token: Check if token is valid## Configuration
You can configure the application settings such as database connection details and JWT secret key in the config/config.js file.