diff --git a/api/config/passport.js b/api/config/passport.js index d96ee55..552bc09 100644 --- a/api/config/passport.js +++ b/api/config/passport.js @@ -11,7 +11,7 @@ module.exports = (passport) => { const options = {} options.jwtFromRequest = ExtractJWT.fromAuthHeaderAsBearerToken() - options.secretOrKey = process.env.tokenSecret || 'secret_j91jasf0j1asfkl' // Change this to only use your own secret token + options.secretOrKey = process.env.tokenSecret passport.use(new StrategyJWT(options, async (jwtPayload, done) => { let user diff --git a/api/serverless.yml b/api/serverless.yml index 99da196..72c1181 100644 --- a/api/serverless.yml +++ b/api/serverless.yml @@ -15,4 +15,4 @@ inputs: # AWS DynamoDB Table Index name. Needed for the code to access it. dbIndex1: ${output:database.indexes.gsi1.name} # A secret token to sign the JWT tokens with. - tokenSecret: secret_1234 # Change to secret via environment variable: ${env:tokenSecret} + tokenSecret: ${env:tokenSecret} # Change to secret via environment variable: ${env:tokenSecret} diff --git a/site/src/config.js b/site/src/config.js index 3044c1b..9772078 100644 --- a/site/src/config.js +++ b/site/src/config.js @@ -13,6 +13,6 @@ config.domains = {} * This will enable your front-end to communicate with your back-end. * (e.g. 'https://api.mydomain.com' or 'https://091jafsl10.execute-api.us-east-1.amazonaws.com') */ -config.domains.api = null +config.domains.api = 'https://13gtp0hrak.execute-api.us-east-1.amazonaws.com' export default config \ No newline at end of file