Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ganeshh123/simple-express-authentication
Dead simple manual authentication for Express Apps - No Passport!
https://github.com/ganeshh123/simple-express-authentication
account authentication cookie custom express hash login manual password registration simple user
Last synced: 4 days ago
JSON representation
Dead simple manual authentication for Express Apps - No Passport!
- Host: GitHub
- URL: https://github.com/ganeshh123/simple-express-authentication
- Owner: ganeshh123
- License: gpl-3.0
- Created: 2020-12-23T12:03:34.000Z (about 4 years ago)
- Default Branch: main
- Last Pushed: 2021-07-29T21:18:51.000Z (over 3 years ago)
- Last Synced: 2024-12-24T05:32:06.814Z (12 days ago)
- Topics: account, authentication, cookie, custom, express, hash, login, manual, password, registration, simple, user
- Language: JavaScript
- Homepage:
- Size: 33.2 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Simple Express Authentication
Dead simple manual authentication for Express Apps - No Passport Required!## Requirements
### Dependencies
- Express
- Bcrypt
- Body-Parser
- Cookie-Parser### Database Requirements
- User Documents must have an array to store tokens (strings)
- User Documents must have a unique ID
- User Documents must have a unique field (currently username, maybe swap for email)## Setup
1. Clone/Download the repository and import `auth.js` and optionally `login.html` and `register.html` to your project
2. Import the `authenticate` function and the `authenticationRoutes` function, and run `authenticationroutes` and give it your express app:```bash
let authenticationRoutes = require('./auth').authenticationRoutes
let authenticate = require('./auth').authenticateauthenticationRoutes(app)
```3. Tweak `auth.js` as desired, and add in the Database Logic
## Features
### Included
- Password Hashing with Bcrypt
### Not Yet Implemented
- Messages to display error messages to users
- Editing Registration Data from Client Side