Hi,
Why namespace in Actions must starts with https:// or http:// ?
This one works:
exports.onExecutePostLogin = async (event, api) => {
const namespace = 'https://test.api';
if (event.authorization) {
api.accessToken.setCustomClaim(`${namespace}/ip`, event.request.ip);
api.accessToken.setCustomClaim(`${namespace}/hostname`, event.request.hostname);
api.accessToken.setCustomClaim(`${namespace}/geoip`, event.request.geoip);
api.idToken.setCustomClaim(`${namespace}/ip`, event.request.ip);
api.idToken.setCustomClaim(`${namespace}/hostname`, event.request.hostname);
api.idToken.setCustomClaim(`${namespace}/geoip`, event.request.geoip);
}
};
but this one does not work:
exports.onExecutePostLogin = async (event, api) => {
const namespace = 'urn:test.api';
if (event.authorization) {
api.accessToken.setCustomClaim(`${namespace}/ip`, event.request.ip);
api.accessToken.setCustomClaim(`${namespace}/hostname`, event.request.hostname);
api.accessToken.setCustomClaim(`${namespace}/geoip`, event.request.geoip);
api.idToken.setCustomClaim(`${namespace}/ip`, event.request.ip);
api.idToken.setCustomClaim(`${namespace}/hostname`, event.request.hostname);
api.idToken.setCustomClaim(`${namespace}/geoip`, event.request.geoip);
}
};