I’m using rules to return user metadata in GET /userinfo endpoint. To do this i must use
context.idToken[namespace]= user.user_metadata;
However the ‘namespace’ variable must contain URL, otherwise metadata will not be shown. It sets URL as json object’s key in response:
"https://custom-rule.custom-field/": {
"pc_number": "3",
"instances_number": "3",
"expiration_date": "2022-01-30",
"creation_date": "2021-12-30",
}
Is there a way to use word instead of URL as json object’s key?
What i’m trying to achieve is
"user_metadata": {
"pc_number": "3",
"instances_number": "3",
"expiration_date": "2022-01-30",
"creation_date": "2021-12-30",
}