Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
ID Token Filter via Rule
function (user, context, callback) {
// console.log("context.request.query: ", context.request.query);
if (context.request.query && context.request.query.response_mode === 'web_message') {
console.log('sanitizing tokens...');
var namespace = 'https://arcseldon.com/';
context.idToken[namespace + '/CRIS_ABC'] = "";
context.idToken[namespace + '/CRIS_DEF'] = "";
}
callback(null, user, context);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment