refactor: drop non-session auth from frontend (#2419)

This commit is contained in:
Severiano Badajoz
2021-09-14 15:55:46 -07:00
committed by GitHub
parent f9c744327a
commit 01013bcf04
15 changed files with 36 additions and 1798 deletions
-21
View File
@@ -1,26 +1,5 @@
const {
SecretsManagerClient,
GetSecretValueCommand,
} = require("@aws-sdk/client-secrets-manager");
const { setup } = require("jest-environment-puppeteer");
const client = new SecretsManagerClient({ region: "us-west-2" });
const deploymentStage = process.env.DEPLOYMENT_STAGE || "test";
const secretValueRequest = {
SecretId: `corpora/backend/${deploymentStage}/auth0-secret`,
};
const command = new GetSecretValueCommand(secretValueRequest);
module.exports = async () => {
await setup();
try {
const secret = JSON.parse((await client.send(command)).SecretString);
process.env.TEST_ACCOUNT_PASS = secret.test_account_password;
} catch (error) {
console.error(error);
}
};