Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/serhiinikif/advanced-auth-pagination
Rest API with authorization (access, refresh), pagination, activation by mail, aggregation, sorting, conversion Uploaded by Vercel π
https://github.com/serhiinikif/advanced-auth-pagination
agregation axios bcrypt cookie-parser express-validator expressjs jwt nodemailer pagination rest-api swagger-jsdoc swagger-ui-express uuid vercel yamljs
Last synced: about 16 hours ago
JSON representation
Rest API with authorization (access, refresh), pagination, activation by mail, aggregation, sorting, conversion Uploaded by Vercel π
- Host: GitHub
- URL: https://github.com/serhiinikif/advanced-auth-pagination
- Owner: SerhiiNikif
- Created: 2023-07-21T12:02:54.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2023-08-30T14:47:51.000Z (about 1 year ago)
- Last Synced: 2023-08-31T00:23:23.846Z (about 1 year ago)
- Topics: agregation, axios, bcrypt, cookie-parser, express-validator, expressjs, jwt, nodemailer, pagination, rest-api, swagger-jsdoc, swagger-ui-express, uuid, vercel, yamljs
- Language: JavaScript
- Homepage: https://advanced-auth-pagination.vercel.app
- Size: 63.5 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# advanced-auth-pagination
# How to use
## 1. Clone Project into your local machine
```
git clone https://github.com/SerhiiNikif/advanced-auth-pagination.git
```## 2. Go into project folder
```
cd advanced-auth-pagination
```## 3. Setting environment file .env.
Create an `.env` file in the root of the project and fill it with the values ββfrom the `.env.sample` file.```
MONGO_URL=local_database_url OR cloud_database_service_url
PORT=4000
JWT_ACCESS_SECRET=jwt-secret-key
JWT_REFRESH_SECRET=jwt-refresh-secret-key
SMTP_HOST=smtp.gmail.com
SMTP_PORT=465
SMTP_USER=your_email
GOOGLE_GEN_PASSWORD=generated app_password in google account
API_URL=http://localhost:4000
CLIENT_URL=https://google.com
PBANK_API_URL=https://api.privatbank.ua/p24api/pubinfo
```## 4. Start project
```
npm install
``````
npm run dev
```## 5. Play with APIs now !
> Please make sure mongoDB Server service is installed and running on your localhost:27017.Now, you are ready to test all APIs.
Just simply open your browser http://localhost:4000/api-docs.## APIs Authorization
> All APIs are protected by accessToken (JWT).
### When calling these protected APIs, make sure you add %BearerToken% in `Authorization` request Header.
```
Authorization: Bearer
```### How to get accessToken ?
When user login sucessfully, an unique accessToken will be returned.