Custom Domain in Rule

I know we can reference our main domain via auth0.domain within a rule. I cannot find anywhere how to reference the custom domain. Anyone able to point me to the right direction here? I feel like I’m missing something simple…

Hi @brian.renak

You can find the custom domain in the context object, under context.request.hostname. You can always check what is available in the context object by creating a simple rule as:

function (user, context, callback) {
return callback(null, user, context);

And then using the Real-time Webtask Logs extension to check the output:

1 Like

Thanks Ricardo! That did it.

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.