Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ services:
- IDC_API_DOMAIN_PORT=${IDC_API_DOMAIN_PORT-8000}
- IDC_API_NYM_ALWAYS=${IDC_API_NYM_ALWAYS-false}
- IDC_API_JWT_SECRET=${IDC_API_JWT_SECRET-changeme}
- IDC_API_JWT_IGNORE_EXPIRATION=${IDC_API_JWT_IGNORE_EXPIRATION-false}
- IDC_API_DB_HOST=${IDC_API_DB_HOST-mongodb}
- IDC_API_DB_PORT=${IDC_API_DB_PORT-27017}
- IDC_API_DB_USER
Expand Down
1 change: 1 addition & 0 deletions env-example
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ IDC_API_DOMAIN_PORT=8000
## ↓↓↓↓-------------------------------------------------------------------------------

IDC_API_JWT_SECRET=your_jwt_secret
IDC_API_JWT_IGNORE_EXPIRATION=false


## ------------------------------------------------------------------------------------
Expand Down
3 changes: 2 additions & 1 deletion middleware/auth.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ const User = require('../models/user');

const jwtOptions = {
jwtFromRequest: ExtractJwt.fromAuthHeaderAsBearerToken(),
secretOrKey: process.env.IDC_API_JWT_SECRET
secretOrKey: process.env.IDC_API_JWT_SECRET,
ignoreExpiration: (process.env.IDC_API_JWT_IGNORE_EXPIRATION || 'false') === 'true'
};

passport.use(
Expand Down