Block auth while external function is called

Is there a way, when using Rules, to call an external API and block the auth process until the API call returns?

1 Like

Yes, until the callback method isn’t called, nothing proceeds. So, you can trigger the callback method once you get the response from your API call but not before.

Take a look at the code of sample rule Enrich profile with FullContact that is available under Dashboard > Rules > + Create Rule > Enrich profile with FullContact to get an idea.

@mathiasconradt this is great…thanks. There are a few items in that rule that are interesting, which I’m hoping you can point me to the official documentation on. In particular, that rule makes use of:

  • There is a request object which has a get method it invokes.
  • There is a auth0 object which has a users method that is invoked
  • There is a require('slack-notify')(SLACK_HOOK); call made

Can you point me to the documentation that lists all of the libraries already included and what those libraries consist of (in this case it would be request and auth0) and other libraries that can be imported (in this case it is the slack-notify library).

Thanks a lot

I stumbled on https://auth0.com/docs/appliance/modules which answers how request and auth0 are included. So the only outstanding item is any documentation on what else I can require (i.e. slack-notify`)?

Can you point me to the documentation that lists all of the libraries already included

Sure, right here: Can I require? - Search which node modules you can use in webtask.io

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