https://github.com/mickaelandrieu/bookstore-oauth2-rest-api
https://github.com/mickaelandrieu/bookstore-oauth2-rest-api
Last synced: 7 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/mickaelandrieu/bookstore-oauth2-rest-api
- Owner: mickaelandrieu
- License: mit
- Created: 2020-12-18T14:54:15.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2020-12-18T15:16:44.000Z (almost 5 years ago)
- Last Synced: 2025-02-03T22:38:32.381Z (8 months ago)
- Language: JavaScript
- Size: 2.93 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# Book Store Node.js/Express.js REST API using OAuth 2 (for learning purposes only)
## Installation
```
git clone https://github.com/mickaelandrieu/bookstore-oauth2-rest-api.git
cd bookstore-oauth2-rest-api
npm i
```## Security
This application demonstrates how to implement OAuth 2 in order to secure access to a simple REST API
and [Facebook Login](https://developers.facebook.com/docs/facebook-login/).## Endpoints
### Security (using FB Login & OAuth2)
* `/oauth-redirect`
* `/error`
* `/logout`### Login (obtain your token)
* `/login`
> Submit in the Body of your HTTP request the mail and the password of the user and you will obtain a JSON Web Token if the credentials are valid.
### Books
* `/books`
* `/books/`### Users
* `/users`
* `/users/`### Book Store management
* `/borrow//`: borrow a book from the book store as an user
* `/bring-back//`: bring back a book to the book store as an userThis project is licensed under the [MIT license](https://opensource.org/licenses/MIT).