@kilterset/auth0-actions-testing
Version:
Test and develop Auth0 Actions or Okta CIC Actions locally.
15 lines (13 loc) • 355 B
JavaScript
/**
* Notify a Slack channel when a new user registers.
*/
exports.onExecutePostUserRegistration = async (event) => {
const payload = {
text: `New User: ${event.user.email}`,
};
await fetch(event.secrets.SLACK_WEBHOOK_URL, {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify(payload),
});
};