Added log message; trying to debug production deployment failure

parent 37e8f93b
......@@ -34,11 +34,17 @@ async function createAndPersitServerSecretIfItDoesntAlreadyExist () {
//
logger.info('Server secret does not exist, creating this one time.')
// Create a server secret as the owner of the site is registering. This is
// the secret that we will use to sign JSON Web Tokens (JWTs).
const serverSecret = sodium.randombytes_buf(sodium.crypto_pwhash_SALTBYTES)
const serverSecretInHex = sodium.to_hex(serverSecret)
const serverSecretObject = { serverSecret: serverSecretInHex }
try {
// Create a server secret as the owner of the site is registering. This is
// the secret that we will use to sign JSON Web Tokens (JWTs).
const serverSecret = sodium.randombytes_buf(sodium.crypto_pwhash_SALTBYTES)
const serverSecretInHex = sodium.to_hex(serverSecret)
const serverSecretObject = { serverSecret: serverSecretInHex }
} catch (error) {
const message = `Error trying to use sodium. ${error}`
logger.error(message)
throw new Error(message)
}
try {
// Write the keys file to a data file in a directory for this spike that
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment