Setting hook secrets using auth0-deploy-cli

Hi,

Im trying to add hook secrets to my environment using the auth0-deploy-cli tool. The documentation on this is not (yet) complete and I dont know the correct format/ syntax.

What I’ve got so far; Directory setup:

  • Root
    • clients
    • connections
    • … etc
    • hooks
      • name-of-my-hook.js
      • name-of-my-hook.json (copied from Rules setup)
    • hook-secrets
      • aws.json (this contains an object with secret key pair values)

I’m using version 4.0.0 of the auth0-deploy-cli.

After deployment my hook is correctly deployed, but the secrets are not available in the hook.

What am I doing wrong?

Maybe you guys can update this page containing some examples.

Hi @Jelle,

Thank you for the feedback on the Auth0 documentation. I’ve shared it with our docs team and they’re prioritizing an update to answer your questions. Look for it later this week.

In the meantime, the example code in the deploy-cli repo on Github might help:

Thanks again!

3 Likes

Hi,
Thanks for the fast reply! Found it in the repo.

For others looking for the same thing; Add your hook secrets in the corresponding hook config file (the .json file as shown above) using:
"secrets": { mysecretKey: "mySecretValue" }

The secrets object can not be a nested object so prefix your secrets :slight_smile:

Would be nice to see the documentation updated.

Thanks!

1 Like

Thanks a lot for sharing it with the rest of community @Jelle!

The doc updates are now live!


We really appreciate your feedback, please let us know what you think about the changes.

1 Like

Thanks for the news Chip!

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