Last active
June 2, 2025 20:37
-
-
Save saltukalakus/ba4119f16d35b715e07ba540bcc74c70 to your computer and use it in GitHub Desktop.
Delegated admin rule
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function (user, context, callback) { | |
// Set the client ID for the delegated admin extension in the below line if you wish | |
// and enable the if conditional | |
//if (context.clientID === 'DELEGATED_ADMIN_EXTENSION_CLIENT_ID') { | |
console.log("Insert the claim for the delegated admin extension"); | |
const namespace = 'https://example.com/auth0-delegated-admin'; | |
context.idToken[namespace] = { roles: [ 'Delegated Admin - Administrator' ] }; | |
return callback(null, user, context); | |
//} | |
callback(null, user, context); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment