Skip to content

Commit

Permalink
persistent cookie fix?
Browse files Browse the repository at this point in the history
  • Loading branch information
Dragon1320 committed Sep 10, 2018
1 parent d17a3ad commit eddcbce
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/web/routes/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ router.get("/auth/discord", async (req, res) => {
res.render("401", { status: 401, message: "Unauthorized", error });
}

res.cookie("session", jwt.sign({ id: new_session_doc._id }, config.jwt_secret), { maxAge: 60000, httpOnly: true, secure: true, signed: true });
res.cookie("session", jwt.sign({ id: new_session_doc._id }, config.jwt_secret), config.rawrxd, { maxAge: 60000, httpOnly: true, secure: true, signed: true });
res.redirect(`https://discordapp.com/api/oauth2/authorize?client_id=${config.discord_id}&redirect_uri=${encodeURIComponent(config.discord_redirect)}&response_type=code&scope=guilds%20identify&state=${nonce}`);
});

Expand Down

0 comments on commit eddcbce

Please sign in to comment.