Skip to content

Commit

Permalink
Add session secret #19
Browse files Browse the repository at this point in the history
  • Loading branch information
sroertgen committed Mar 4, 2024
1 parent bd79080 commit 2c9ad68
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 1 deletion.
2 changes: 2 additions & 0 deletions .env.sample
Original file line number Diff line number Diff line change
Expand Up @@ -24,5 +24,7 @@ ORCID_GETUSER_URL=https://sandbox.orcid.org/oauth/userinfo
ORCID_ID=
ORCID_SECRET=

SESSION_SECRET=

CONTACT_MAIL=[email protected]

1 change: 1 addition & 0 deletions src/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ export const config = {
orcid_id: process.env.ORCID_ID,
orcid_secret: process.env.ORCID_SECRET,
contact_mail: process.env.CONTACT_MAIL,
session_secret: process.env.SESSION_SECRET,
}

if (result.error) {
Expand Down
2 changes: 1 addition & 1 deletion src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ const upload = multer({ storage: storage, });

app.use(express.static("public"));
app.use(session({
secret: config.client_secret,
secret: config.session_secret,
resave: false,
saveUninitialized: true,
}));
Expand Down

0 comments on commit 2c9ad68

Please sign in to comment.