Authenticate calls from auth0 hooks to my server

I want to call my server from postRegistration hook.
I can write my own authentication layer for that, but I guess there’s already something that I can use.
The hook function looks like this: function (user, context, cb)

Looking at the context object, I’ve found that all of the following contain the same secret:

And all of the following contain the same jwt:

I’m not even sure what fields from the context am I supposed to be using. Most of it looks like details of the request between auth0 and (the service that auth0 are using to run my hook script)

So - can I use the secret or JWT as authentication to my own server? If I can, which path in the context should I prefer?


Welcome to the Community @app.charttt!

To make the call between your hook and server, you should be using a M2M flow. Check out this FAQ about making the call from a rule, it is a very similar scenario:

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