chore: move jwt secrets to .env

This commit is contained in:
canove
2020-11-07 16:57:00 -03:00
parent 3859f996d0
commit 2ff3b07f84
3 changed files with 11 additions and 2 deletions

View File

@@ -91,6 +91,9 @@ DB_DIALECT=
DB_USER= DB_USER=
DB_PASS= DB_PASS=
DB_NAME= DB_NAME=
JWT_SECRET=3123123213123
JWT_REFRESH_SECRET=75756756756
``` ```
Install backend dependencies, build app, run migrations and seeds: Install backend dependencies, build app, run migrations and seeds:
@@ -205,6 +208,9 @@ DB_DIALECT=
DB_USER= DB_USER=
DB_PASS= DB_PASS=
DB_NAME= DB_NAME=
JWT_SECRET=3123123213123
JWT_REFRESH_SECRET=75756756756
``` ```
Install puppeteer dependencies: Install puppeteer dependencies:

View File

@@ -9,3 +9,6 @@ DB_HOST=
DB_USER= DB_USER=
DB_PASS= DB_PASS=
DB_NAME= DB_NAME=
JWT_SECRET=3123123213123
JWT_REFRESH_SECRET=75756756756

View File

@@ -1,6 +1,6 @@
export default { export default {
secret: "mysecret", secret: process.env.JWT_SECRET || "mysecret",
expiresIn: "15m", expiresIn: "15m",
refreshSecret: "myanothersecret", refreshSecret: process.env.JWT_REFRESH_SECRET || "myanothersecret",
refreshExpiresIn: "7d" refreshExpiresIn: "7d"
}; };