Skip to content

Commit

Permalink
fix: adding token secret
Browse files Browse the repository at this point in the history
Signed-off-by: Akarshit Wal <[email protected]>
  • Loading branch information
Akarshit committed Aug 18, 2021
1 parent 7686ecf commit bb70472
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ const { str } = envalid;
export default envalid.cleanEnv(
process.env,
{
STORE_URL: str({ devDefault: "http://localhost:4000" })
STORE_URL: str({ devDefault: "http://localhost:4000" }),
TOKEN_SECRET: str({ default: "UPDATE_THIS_SECRET" })
},
{
dotEnvPath: null
Expand Down
3 changes: 2 additions & 1 deletion src/util/accountServer.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ export default async (app) => {
if (accountsServer && accountsGraphQL) {
return { accountsServer, accountsGraphQL };
}
const { MONGO_URL, STORE_URL } = config;
const { MONGO_URL, STORE_URL, TOKEN_SECRET } = config;
const { context } = app;

const client = await mongoConnectWithRetry(MONGO_URL);
Expand All @@ -30,6 +30,7 @@ export default async (app) => {
accountsServer = new AccountsServer(
{
siteUrl: STORE_URL,
tokenSecret: TOKEN_SECRET,
db: accountsMongo,
enableAutologin: true,
ambiguousErrorMessages: false,
Expand Down

0 comments on commit bb70472

Please sign in to comment.