I have the following code. I want to set the xxxxxx
in logins to process.env.cognitoId
, where congitoId
has the string I need to pass in as a key. This particular string is unique and must not be shown, how can I achieve this?
AWS.config.credentials = new AWS.CognitoIdentityCredentials({
IdentityPoolId: process.env.IdentityPoolId,
Logins: {
'xxxxxxxxx': val.token
}
})
Use [] not string interpolation. That will allow you to set the key