https://github.com/konradmi/auth-nodejs-mongo
Boilerplate for server side authentication with node.js, passport and MongoDB
https://github.com/konradmi/auth-nodejs-mongo
authentication express jwt mongo nodejs passportjs
Last synced: 3 months ago
JSON representation
Boilerplate for server side authentication with node.js, passport and MongoDB
- Host: GitHub
- URL: https://github.com/konradmi/auth-nodejs-mongo
- Owner: konradmi
- Created: 2017-06-24T11:13:05.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2017-10-08T19:34:11.000Z (over 8 years ago)
- Last Synced: 2025-07-01T18:10:12.426Z (12 months ago)
- Topics: authentication, express, jwt, mongo, nodejs, passportjs
- Language: JavaScript
- Homepage:
- Size: 22.5 KB
- Stars: 1
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# auth-nodejs-mongo
Boilerplate for authentication using node.js and mongo. Based on Stephen Grider's course.
## Setup
Install mongodb
Run `mongod`
Run `yarn install`
Run `yarn run dev`
## Available routes and how it works
`/signup` - it accepts email and password. Once it's been verified that there's no user with the given email in the database, the email and hashed password is save in the database and a JWT token is created and sent back to the user
`/singin` - it accepts email and password. It checks if the email and password are ok and a JWT token is sent back to the user
`/` - in order to access the route you have to include the JWT token in the `authorization` header in the request.