Hook that ignores dashboard actions

Trying to implement a Pre User Registration hook that whitelists users, however, I would like to still allow creation from the dashboard for non whitelisted domains. Is there any way to do this? I’ve tried looking at various properties of the context, but many of the properties that have values in the hook runner are undefined when creating the user from the dashboard (webtask.headers.referer, webtask.headers.origin) etc. Wondering what I can look at to determine this.