I am using the pre token generation trigger to insert custom claims to my token. One of the claims is a list:
exports.handler = (event, context, callback) => {
event.response = {
"claimsOverrideDetails": {
"claimsToAddOrOverride": {
"subscription_name": "FLEXI",
"subscriptions" : {
"id": "Wakanda",
"country": "Namibia"
}
},
"claimsToSuppress": ["token_use"]
}
};
callback(null, event);
}
What am I doing wrong?