diff --git a/main/config/nav.en.json b/main/config/nav.en.json index 8553d12b8e..d59eb2cb71 100644 --- a/main/config/nav.en.json +++ b/main/config/nav.en.json @@ -66,6 +66,11 @@ "icon": "/icons/events-catalog.svg", "$ref": "./navigation/generated/events-catalog.en.json" }, + { + "item": "Actions Reference", + "icon": "/icons/actions-reference.svg", + "$ref": "./navigation/generated/actions-reference.en.json" + }, { "item": "Tenant Log Catalog", "icon": "/icons/tenant-logs.svg", diff --git a/main/config/nav.fr-ca.json b/main/config/nav.fr-ca.json index dc890d4c57..b06eba7e8e 100644 --- a/main/config/nav.fr-ca.json +++ b/main/config/nav.fr-ca.json @@ -2364,6 +2364,10 @@ { "tab": "Tenant Log Catalog", "$ref": "./navigation/generated/tenant-logs.fr-ca.json" + }, + { + "tab": "Actions Reference", + "$ref": "./navigation/generated/actions-reference.fr-ca.json" } ] } diff --git a/main/config/nav.ja-jp.json b/main/config/nav.ja-jp.json index 87b2575813..197df5bf15 100644 --- a/main/config/nav.ja-jp.json +++ b/main/config/nav.ja-jp.json @@ -2364,6 +2364,10 @@ { "tab": "Tenant Log Catalog", "$ref": "./navigation/generated/tenant-logs.ja-jp.json" + }, + { + "tab": "Actions Reference", + "$ref": "./navigation/generated/actions-reference.ja-jp.json" } ] } diff --git a/main/config/navigation/customize.json b/main/config/navigation/customize.json index ff5fe08b14..757c9fdf39 100644 --- a/main/config/navigation/customize.json +++ b/main/config/navigation/customize.json @@ -124,9 +124,7 @@ "group": "Custom Configuration with Actions", "root": "docs/customize/email/smtp-email-providers/custom", "pages": [ - "docs/customize/email/smtp-email-providers/custom/configure-action", - "docs/customize/email/smtp-email-providers/custom/action-triggers-custom-email-provider-event-object", - "docs/customize/email/smtp-email-providers/custom/action-triggers-custom-email-provider-api-object" + "docs/customize/email/smtp-email-providers/custom/configure-action" ] }, "docs/customize/email/smtp-email-providers/troubleshooting" @@ -169,9 +167,7 @@ "root": "docs/customize/phone-messages/configure-phone-messaging-providers/configure-a-custom-phone-provider", "pages": [ "docs/customize/phone-messages/configure-phone-messaging-providers/configure-a-custom-phone-provider/configure-a-custom-phone-provider-with-terraform", - "docs/customize/phone-messages/configure-phone-messaging-providers/configure-a-custom-phone-provider/configure-a-custom-phone-provider-with-twilio-verify", - "docs/customize/phone-messages/configure-phone-messaging-providers/configure-a-custom-phone-provider/action-triggers-custom-phone-provider-api-object", - "docs/customize/phone-messages/configure-phone-messaging-providers/configure-a-custom-phone-provider/actions-triggers-custom-phone-provider-event-object" + "docs/customize/phone-messages/configure-phone-messaging-providers/configure-a-custom-phone-provider/configure-a-custom-phone-provider-with-twilio-verify" ] } ] @@ -236,94 +232,20 @@ "group": "Explore Triggers", "pages": [ "docs/customize/actions/explore-triggers", - { - "group": "Signup and Login Triggers", - "pages": [ - "docs/customize/actions/explore-triggers/signup-and-login-triggers", - { - "group": "Login Trigger", - "pages": [ - "docs/customize/actions/explore-triggers/signup-and-login-triggers/login-trigger", - "docs/customize/actions/explore-triggers/signup-and-login-triggers/login-trigger/post-login-event-object", - "docs/customize/actions/explore-triggers/signup-and-login-triggers/login-trigger/post-login-api-object", - "docs/customize/actions/explore-triggers/signup-and-login-triggers/login-trigger/redirect-with-actions" - ] - }, - { - "group": "Custom Token Exchange Trigger", - "pages": [ - "docs/customize/actions/explore-triggers/signup-and-login-triggers/custom-token-exchange-trigger", - "docs/customize/actions/explore-triggers/signup-and-login-triggers/custom-token-exchange-trigger/custom-token-exchange-event-object", - "docs/customize/actions/explore-triggers/signup-and-login-triggers/custom-token-exchange-trigger/custom-token-exchange-api-object" - ] - }, - { - "group": "Pre-user Registration Trigger", - "pages": [ - "docs/customize/actions/explore-triggers/signup-and-login-triggers/pre-user-registration-trigger", - "docs/customize/actions/explore-triggers/signup-and-login-triggers/pre-user-registration-trigger/pre-user-registration-event-object", - "docs/customize/actions/explore-triggers/signup-and-login-triggers/pre-user-registration-trigger/pre-user-registration-api-object" - ] - }, - { - "group": "Post-user Registration Trigger", - "pages": [ - "docs/customize/actions/explore-triggers/signup-and-login-triggers/post-user-registration-trigger", - "docs/customize/actions/explore-triggers/signup-and-login-triggers/post-user-registration-trigger/post-user-registration-event-object", - "docs/customize/actions/explore-triggers/signup-and-login-triggers/post-user-registration-trigger/post-user-registration-api-object" - ] - } - ] - }, - { - "group": "MFA Notifications Trigger", - "pages": [ - "docs/customize/actions/explore-triggers/mfa-notifications-trigger", - "docs/customize/actions/explore-triggers/mfa-notifications-trigger/send-phone-message-event-object", - "docs/customize/actions/explore-triggers/mfa-notifications-trigger/send-phone-message-api-object" - ] - }, - { - "group": "Password Reset Triggers", - "pages": [ - "docs/customize/actions/explore-triggers/password-reset-triggers", - { - "group": "Post-challenge Trigger", - "pages": [ - "docs/customize/actions/explore-triggers/password-reset-triggers/post-challenge-trigger", - "docs/customize/actions/explore-triggers/password-reset-triggers/post-challenge-trigger/post-challenge-event-object", - "docs/customize/actions/explore-triggers/password-reset-triggers/post-challenge-trigger/post-challenge-api-object" - ] - }, - { - "group": "Post Change Password Trigger", - "pages": [ - "docs/customize/actions/explore-triggers/password-reset-triggers/post-change-password-trigger", - "docs/customize/actions/explore-triggers/password-reset-triggers/post-change-password-trigger/post-change-password-event-object", - "docs/customize/actions/explore-triggers/password-reset-triggers/post-change-password-trigger/post-change-password-api-object" - ] - } - ] - }, - { - "group": "Machine to Machine Trigger", - "pages": [ - "docs/customize/actions/explore-triggers/machine-to-machine-trigger", - "docs/customize/actions/explore-triggers/machine-to-machine-trigger/credentials-exchange-event-object", - "docs/customize/actions/explore-triggers/machine-to-machine-trigger/credentials-exchange-api-object" - ] - }, - { - "group": "Event Stream Triggers", - "pages": [ - "docs/customize/actions/explore-triggers/event-stream-triggers", - "docs/customize/actions/explore-triggers/event-stream-triggers/event-stream-event-object", - "docs/customize/actions/explore-triggers/event-stream-triggers/event-stream-api-object" - ] - } + "docs/customize/actions/explore-triggers/credentials-exchange", + "docs/customize/actions/explore-triggers/custom-token-exchange", + "docs/customize/actions/explore-triggers/event-stream", + "docs/customize/actions/explore-triggers/password-reset-post-challenge", + "docs/customize/actions/explore-triggers/post-change-password", + "docs/customize/actions/explore-triggers/post-login", + "docs/customize/actions/explore-triggers/post-user-registration", + "docs/customize/actions/explore-triggers/pre-user-registration", + "docs/customize/actions/explore-triggers/send-phone-message" ] }, + "docs/customize/actions/actions-reference", "docs/customize/actions/use-cases", + "docs/customize/actions/redirect-with-actions", "docs/customize/actions/transaction-metadata", "docs/customize/actions/limitations", "docs/customize/actions/actions-real-time-logs", diff --git a/main/config/navigation/generated/actions-reference.en.json b/main/config/navigation/generated/actions-reference.en.json new file mode 100644 index 0000000000..6ab5b35651 --- /dev/null +++ b/main/config/navigation/generated/actions-reference.en.json @@ -0,0 +1,82 @@ +{ + "pages": [ + "docs/actions/reference", + { + "group": "Credentials Exchange", + "pages": [ + "docs/actions/reference/credentials-exchange/credentials-exchange-event-object", + "docs/actions/reference/credentials-exchange/credentials-exchange-api-object" + ] + }, + { + "group": "Custom Phone Provider", + "pages": [ + "docs/actions/reference/custom-phone-provider/custom-phone-provider-event-object", + "docs/actions/reference/custom-phone-provider/custom-phone-provider-api-object" + ] + }, + { + "group": "Custom Email Provider", + "pages": [ + "docs/actions/reference/custom-email-provider/custom-email-provider-event-object", + "docs/actions/reference/custom-email-provider/custom-email-provider-api-object" + ] + }, + { + "group": "Custom Token Exchange", + "pages": [ + "docs/actions/reference/custom-token-exchange/custom-token-exchange-event-object", + "docs/actions/reference/custom-token-exchange/custom-token-exchange-api-object" + ] + }, + { + "group": "Event Stream", + "pages": [ + "docs/actions/reference/event-stream/event-stream-event-object", + "docs/actions/reference/event-stream/event-stream-api-object" + ] + }, + { + "group": "Password Reset Post Challenge", + "pages": [ + "docs/actions/reference/password-reset-post-challenge/password-reset-post-challenge-event-object", + "docs/actions/reference/password-reset-post-challenge/password-reset-post-challenge-api-object" + ] + }, + { + "group": "Post User Registration", + "pages": [ + "docs/actions/reference/post-user-registration/post-user-registration-event-object", + "docs/actions/reference/post-user-registration/post-user-registration-api-object" + ] + }, + { + "group": "Post Login", + "pages": [ + "docs/actions/reference/post-login/post-login-event-object", + "docs/actions/reference/post-login/post-login-api-object" + ] + }, + { + "group": "Post Change Password", + "pages": [ + "docs/actions/reference/post-change-password/post-change-password-event-object", + "docs/actions/reference/post-change-password/post-change-password-api-object" + ] + }, + { + "group": "Pre User Registration", + "pages": [ + "docs/actions/reference/pre-user-registration/pre-user-registration-event-object", + "docs/actions/reference/pre-user-registration/pre-user-registration-api-object" + ] + }, + { + "group": "Send Phone Message", + "pages": [ + "docs/actions/reference/send-phone-message/send-phone-message-event-object", + "docs/actions/reference/send-phone-message/send-phone-message-api-object" + ] + } + ] +} \ No newline at end of file diff --git a/main/config/navigation/generated/actions-reference.fr-ca.json b/main/config/navigation/generated/actions-reference.fr-ca.json new file mode 100644 index 0000000000..6ab5b35651 --- /dev/null +++ b/main/config/navigation/generated/actions-reference.fr-ca.json @@ -0,0 +1,82 @@ +{ + "pages": [ + "docs/actions/reference", + { + "group": "Credentials Exchange", + "pages": [ + "docs/actions/reference/credentials-exchange/credentials-exchange-event-object", + "docs/actions/reference/credentials-exchange/credentials-exchange-api-object" + ] + }, + { + "group": "Custom Phone Provider", + "pages": [ + "docs/actions/reference/custom-phone-provider/custom-phone-provider-event-object", + "docs/actions/reference/custom-phone-provider/custom-phone-provider-api-object" + ] + }, + { + "group": "Custom Email Provider", + "pages": [ + "docs/actions/reference/custom-email-provider/custom-email-provider-event-object", + "docs/actions/reference/custom-email-provider/custom-email-provider-api-object" + ] + }, + { + "group": "Custom Token Exchange", + "pages": [ + "docs/actions/reference/custom-token-exchange/custom-token-exchange-event-object", + "docs/actions/reference/custom-token-exchange/custom-token-exchange-api-object" + ] + }, + { + "group": "Event Stream", + "pages": [ + "docs/actions/reference/event-stream/event-stream-event-object", + "docs/actions/reference/event-stream/event-stream-api-object" + ] + }, + { + "group": "Password Reset Post Challenge", + "pages": [ + "docs/actions/reference/password-reset-post-challenge/password-reset-post-challenge-event-object", + "docs/actions/reference/password-reset-post-challenge/password-reset-post-challenge-api-object" + ] + }, + { + "group": "Post User Registration", + "pages": [ + "docs/actions/reference/post-user-registration/post-user-registration-event-object", + "docs/actions/reference/post-user-registration/post-user-registration-api-object" + ] + }, + { + "group": "Post Login", + "pages": [ + "docs/actions/reference/post-login/post-login-event-object", + "docs/actions/reference/post-login/post-login-api-object" + ] + }, + { + "group": "Post Change Password", + "pages": [ + "docs/actions/reference/post-change-password/post-change-password-event-object", + "docs/actions/reference/post-change-password/post-change-password-api-object" + ] + }, + { + "group": "Pre User Registration", + "pages": [ + "docs/actions/reference/pre-user-registration/pre-user-registration-event-object", + "docs/actions/reference/pre-user-registration/pre-user-registration-api-object" + ] + }, + { + "group": "Send Phone Message", + "pages": [ + "docs/actions/reference/send-phone-message/send-phone-message-event-object", + "docs/actions/reference/send-phone-message/send-phone-message-api-object" + ] + } + ] +} \ No newline at end of file diff --git a/main/config/navigation/generated/actions-reference.ja-jp.json b/main/config/navigation/generated/actions-reference.ja-jp.json new file mode 100644 index 0000000000..6ab5b35651 --- /dev/null +++ b/main/config/navigation/generated/actions-reference.ja-jp.json @@ -0,0 +1,82 @@ +{ + "pages": [ + "docs/actions/reference", + { + "group": "Credentials Exchange", + "pages": [ + "docs/actions/reference/credentials-exchange/credentials-exchange-event-object", + "docs/actions/reference/credentials-exchange/credentials-exchange-api-object" + ] + }, + { + "group": "Custom Phone Provider", + "pages": [ + "docs/actions/reference/custom-phone-provider/custom-phone-provider-event-object", + "docs/actions/reference/custom-phone-provider/custom-phone-provider-api-object" + ] + }, + { + "group": "Custom Email Provider", + "pages": [ + "docs/actions/reference/custom-email-provider/custom-email-provider-event-object", + "docs/actions/reference/custom-email-provider/custom-email-provider-api-object" + ] + }, + { + "group": "Custom Token Exchange", + "pages": [ + "docs/actions/reference/custom-token-exchange/custom-token-exchange-event-object", + "docs/actions/reference/custom-token-exchange/custom-token-exchange-api-object" + ] + }, + { + "group": "Event Stream", + "pages": [ + "docs/actions/reference/event-stream/event-stream-event-object", + "docs/actions/reference/event-stream/event-stream-api-object" + ] + }, + { + "group": "Password Reset Post Challenge", + "pages": [ + "docs/actions/reference/password-reset-post-challenge/password-reset-post-challenge-event-object", + "docs/actions/reference/password-reset-post-challenge/password-reset-post-challenge-api-object" + ] + }, + { + "group": "Post User Registration", + "pages": [ + "docs/actions/reference/post-user-registration/post-user-registration-event-object", + "docs/actions/reference/post-user-registration/post-user-registration-api-object" + ] + }, + { + "group": "Post Login", + "pages": [ + "docs/actions/reference/post-login/post-login-event-object", + "docs/actions/reference/post-login/post-login-api-object" + ] + }, + { + "group": "Post Change Password", + "pages": [ + "docs/actions/reference/post-change-password/post-change-password-event-object", + "docs/actions/reference/post-change-password/post-change-password-api-object" + ] + }, + { + "group": "Pre User Registration", + "pages": [ + "docs/actions/reference/pre-user-registration/pre-user-registration-event-object", + "docs/actions/reference/pre-user-registration/pre-user-registration-api-object" + ] + }, + { + "group": "Send Phone Message", + "pages": [ + "docs/actions/reference/send-phone-message/send-phone-message-event-object", + "docs/actions/reference/send-phone-message/send-phone-message-api-object" + ] + } + ] +} \ No newline at end of file diff --git a/main/config/redirects.json b/main/config/redirects.json index b696745638..bf8096bf53 100644 --- a/main/config/redirects.json +++ b/main/config/redirects.json @@ -169,11 +169,11 @@ }, { "source": "/docs/customize/email/configure-a-custom-email-provider/action-triggers-custom-email-provider-event-object", - "destination": "/docs/customize/email/smtp-email-providers/custom/action-triggers-custom-email-provider-event-object" + "destination": "/docs/actions/reference/custom-email-provider/custom-email-provider-event-object" }, { "source": "/docs/customize/email/configure-a-custom-email-provider/action-triggers-custom-email-provider-api-object", - "destination": "/docs/customize/email/smtp-email-providers/custom/action-triggers-custom-email-provider-api-object" + "destination": "/docs/actions/reference/custom-email-provider/custom-email-provider-api-object" }, { "source": "/docs/customize/email/customize-blocked-account-emails", @@ -257,7 +257,7 @@ }, { "source": "/docs/auth0-hooks/extensibility-points/post-user-registration", - "destination": "/docs/customize/actions/explore-triggers/signup-and-login-triggers/post-user-registration-trigger" + "destination": "/docs/customize/actions/explore-triggers/post-user-registration" }, { "source": "/docs/deploy-advanced-customizations-to-production", @@ -12121,127 +12121,127 @@ }, { "source": "/docs/customize/actions/explore-triggers/signup-and-login-triggers/login-trigger/releases", - "destination": "/docs/customize/actions/explore-triggers/signup-and-login-triggers/login-trigger" + "destination": "/docs/customize/actions/explore-triggers" }, { "source": "/docs/customize/actions/releases", - "destination": "/docs/customize/actions/explore-triggers/signup-and-login-triggers/login-trigger" + "destination": "/docs/customize/actions/explore-triggers" }, { "source": "/docs/customize/actions/flows-and-triggers/login-flow/releases", - "destination": "/docs/customize/actions/explore-triggers/signup-and-login-triggers/login-trigger" + "destination": "/docs/customize/actions/explore-triggers" }, { "source": "/docs/ja-jp/customize/actions/explore-triggers/signup-and-login-triggers/login-trigger/releases", - "destination": "/docs/ja-jp/customize/actions/explore-triggers/signup-and-login-triggers/login-trigger" + "destination": "/docs/ja-jp/customize/actions/explore-triggers" }, { "source": "/docs/ja-jp/customize/actions/releases", - "destination": "/docs/ja-jp/customize/actions/explore-triggers/signup-and-login-triggers/login-trigger" + "destination": "/docs/ja-jp/customize/actions/explore-triggers" }, { "source": "/docs/ja-jp/customize/actions/flows-and-triggers/login-flow/releases", - "destination": "/docs/ja-jp/customize/actions/explore-triggers/signup-and-login-triggers/login-trigger" + "destination": "/docs/ja-jp/customize/actions/explore-triggers" }, { "source": "/docs/fr-ca/customize/actions/explore-triggers/signup-and-login-triggers/login-trigger/releases", - "destination": "/docs/fr-ca/customize/actions/explore-triggers/signup-and-login-triggers/login-trigger" + "destination": "/docs/fr-ca/customize/actions/explore-triggers" }, { "source": "/docs/fr-ca/customize/actions/releases", - "destination": "/docs/fr-ca/customize/actions/explore-triggers/signup-and-login-triggers/login-trigger" + "destination": "/docs/fr-ca/customize/actions/explore-triggers" }, { "source": "/docs/fr-ca/customize/actions/flows-and-triggers/login-flow/releases", - "destination": "/docs/fr-ca/customize/actions/explore-triggers/signup-and-login-triggers/login-trigger" + "destination": "/docs/fr-ca/customize/actions/explore-triggers" }, { "source": "/docs/customize/actions/flows-and-triggers/login-flow/redirect-with-actions", - "destination": "/docs/customize/actions/explore-triggers/signup-and-login-triggers/login-trigger/redirect-with-actions" + "destination": "/docs/customize/actions/redirect-with-actions" }, { "source": "/docs/customize/actions/triggers/post-login/redirect-with-actions", - "destination": "/docs/customize/actions/explore-triggers/signup-and-login-triggers/login-trigger/redirect-with-actions" + "destination": "/docs/customize/actions/redirect-with-actions" }, { "source": "/docs/actions/triggers/post-login/redirect-with-actions", - "destination": "/docs/customize/actions/explore-triggers/signup-and-login-triggers/login-trigger/redirect-with-actions" + "destination": "/docs/customize/actions/redirect-with-actions" }, { "source": "/docs/customize/actions/flows-and-triggers/login-flow/api-object", - "destination": "/docs/customize/actions/explore-triggers/signup-and-login-triggers/login-trigger/post-login-api-object" + "destination": "/docs/actions/reference/post-login/post-login-api-object" }, { "source": "/docs/customize/actions/triggers/post-login/api-object", - "destination": "/docs/customize/actions/explore-triggers/signup-and-login-triggers/login-trigger/post-login-api-object" + "destination": "/docs/actions/reference/post-login/post-login-api-object" }, { "source": "/docs/actions/triggers/post-login/api-object", - "destination": "/docs/customize/actions/explore-triggers/signup-and-login-triggers/login-trigger/post-login-api-object" + "destination": "/docs/actions/reference/post-login/post-login-api-object" }, { "source": "/docs/customize/actions/flows-and-triggers/login-flow/event-object", - "destination": "/docs/customize/actions/explore-triggers/signup-and-login-triggers/login-trigger/post-login-event-object" + "destination": "/docs/actions/reference/post-login/post-login-event-object" }, { "source": "/docs/customize/actions/triggers/post-login/event-object", - "destination": "/docs/customize/actions/explore-triggers/signup-and-login-triggers/login-trigger/post-login-event-object" + "destination": "/docs/actions/reference/post-login/post-login-event-object" }, { "source": "/docs/actions/triggers/post-login/event-object", - "destination": "/docs/customize/actions/explore-triggers/signup-and-login-triggers/login-trigger/post-login-event-object" + "destination": "/docs/actions/reference/post-login/post-login-event-object" }, { "source": "/docs/customize/actions/flows-and-triggers/login-flow", - "destination": "/docs/customize/actions/explore-triggers/signup-and-login-triggers/login-trigger" + "destination": "/docs/customize/actions/explore-triggers/post-login" }, { "source": "/docs/customize/actions/triggers/post-login", - "destination": "/docs/customize/actions/explore-triggers/signup-and-login-triggers/login-trigger" + "destination": "/docs/customize/actions/explore-triggers/post-login" }, { "source": "/docs/actions/triggers/post-login", - "destination": "/docs/customize/actions/explore-triggers/signup-and-login-triggers/login-trigger" + "destination": "/docs/customize/actions/explore-triggers/post-login" }, { "source": "/docs/customize/actions/triggers/credentials-exchange/api-object", - "destination": "/docs/customize/actions/explore-triggers/machine-to-machine-trigger" + "destination": "/docs/actions/reference/credentials-exchange/credentials-exchange-api-object" }, { "source": "/docs/actions/triggers/credentials-exchange/api-object", - "destination": "/docs/customize/actions/explore-triggers/machine-to-machine-trigger" + "destination": "/docs/actions/reference/credentials-exchange/credentials-exchange-api-object" }, { "source": "/docs/customize/actions/flows-and-triggers/password-reset/api-object", - "destination": "/docs/customize/actions/explore-triggers/password-reset-triggers/post-challenge-trigger/post-challenge-api-object" + "destination": "/docs/actions/reference/password-reset-post-challenge/password-reset-post-challenge-api-object" }, { "source": "/docs/customize/actions/flows-and-triggers/password-reset/event-object", - "destination": "/docs/customize/actions/explore-triggers/password-reset-triggers/post-challenge-trigger/post-challenge-event-object" + "destination": "/docs/actions/reference/password-reset-post-challenge/password-reset-post-challenge-event-object" }, { "source": "/docs/customize/actions/flows-and-triggers/password-reset", - "destination": "/docs/customize/actions/explore-triggers/password-reset-triggers" + "destination": "/docs/customize/actions/explore-triggers" }, { "source": "/docs/customize/actions/flows-and-triggers/machine-to-machine-flow/api-object", - "destination": "/docs/customize/actions/explore-triggers/machine-to-machine-trigger/credentials-exchange-api-object" + "destination": "/docs/actions/reference/credentials-exchange/credentials-exchange-api-object" }, { "source": "/docs/customize/actions/flows-and-triggers/machine-to-machine-flow/event-object", - "destination": "/docs/customize/actions/explore-triggers/machine-to-machine-trigger/credentials-exchange-event-object" + "destination": "/docs/actions/reference/credentials-exchange/credentials-exchange-event-object" }, { "source": "/docs/customize/actions/triggers/credentials-exchange/event-object", - "destination": "/docs/customize/actions/explore-triggers/machine-to-machine-trigger/credentials-exchange-event-object" + "destination": "/docs/actions/reference/credentials-exchange/credentials-exchange-event-object" }, { "source": "/docs/actions/triggers/credentials-exchange/event-object", - "destination": "/docs/customize/actions/explore-triggers/machine-to-machine-trigger/credentials-exchange-event-object" + "destination": "/docs/actions/reference/credentials-exchange/credentials-exchange-event-object" }, { "source": "/docs/customize/actions/flows-and-triggers/machine-to-machine-flow", - "destination": "/docs/customize/actions/explore-triggers/machine-to-machine-trigger" + "destination": "/docs/customize/actions/explore-triggers/credentials-exchange" }, { "source": "/docs/customize/actions/triggers/credentials-exchange", @@ -12253,95 +12253,95 @@ }, { "source": "/docs/customize/actions/flows-and-triggers/pre-user-registration-flow/api-object", - "destination": "/docs/customize/actions/explore-triggers/signup-and-login-triggers/pre-user-registration-trigger/pre-user-registration-api-object" + "destination": "/docs/actions/reference/pre-user-registration/pre-user-registration-api-object" }, { "source": "/docs/customize/actions/triggers/pre-user-registration/api-object", - "destination": "/docs/customize/actions/explore-triggers/signup-and-login-triggers/pre-user-registration-trigger/pre-user-registration-api-object" + "destination": "/docs/actions/reference/pre-user-registration/pre-user-registration-api-object" }, { "source": "/docs/actions/triggers/pre-user-registration/api-object", - "destination": "/docs/customize/actions/explore-triggers/signup-and-login-triggers/pre-user-registration-trigger/pre-user-registration-api-object" + "destination": "/docs/actions/reference/pre-user-registration/pre-user-registration-api-object" }, { "source": "/docs/customize/actions/flows-and-triggers/pre-user-registration-flow/event-object", - "destination": "/docs/customize/actions/explore-triggers/signup-and-login-triggers/pre-user-registration-trigger/pre-user-registration-event-object" + "destination": "/docs/actions/reference/pre-user-registration/pre-user-registration-event-object" }, { "source": "/docs/customize/actions/triggers/pre-user-registration/event-object", - "destination": "/docs/customize/actions/explore-triggers/signup-and-login-triggers/pre-user-registration-trigger/pre-user-registration-event-object" + "destination": "/docs/actions/reference/pre-user-registration/pre-user-registration-event-object" }, { "source": "/docs/actions/triggers/pre-user-registration/event-object", - "destination": "/docs/customize/actions/explore-triggers/signup-and-login-triggers/pre-user-registration-trigger/pre-user-registration-event-object" + "destination": "/docs/actions/reference/pre-user-registration/pre-user-registration-event-object" }, { "source": "/docs/customize/actions/flows-and-triggers/pre-user-registration-flow", - "destination": "/docs/customize/actions/explore-triggers/signup-and-login-triggers/pre-user-registration-trigger" + "destination": "/docs/customize/actions/explore-triggers/pre-user-registration" }, { "source": "/docs/customize/actions/triggers/pre-user-registration", - "destination": "/docs/customize/actions/explore-triggers/signup-and-login-triggers/pre-user-registration-trigger" + "destination": "/docs/customize/actions/explore-triggers/pre-user-registration" }, { "source": "/docs/actions/triggers/pre-user-registration", - "destination": "/docs/customize/actions/explore-triggers/signup-and-login-triggers/pre-user-registration-trigger" + "destination": "/docs/customize/actions/explore-triggers/pre-user-registration" }, { "source": "/docs/customize/actions/flows-and-triggers/post-user-registration-flow/api-object", - "destination": "/docs/customize/actions/explore-triggers/signup-and-login-triggers/post-user-registration-trigger/post-user-registration-api-object" + "destination": "/docs/actions/reference/post-user-registration/post-user-registration-api-object" }, { "source": "/docs/customize/actions/flows-and-triggers/post-user-registration-flow/event-object", - "destination": "/docs/customize/actions/explore-triggers/signup-and-login-triggers/post-user-registration-trigger/post-user-registration-event-object" + "destination": "/docs/actions/reference/post-user-registration/post-user-registration-event-object" }, { "source": "/docs/customize/actions/triggers/post-user-registration/event-object", - "destination": "/docs/customize/actions/explore-triggers/signup-and-login-triggers/post-user-registration-trigger/post-user-registration-event-object" + "destination": "/docs/actions/reference/post-user-registration/post-user-registration-event-object" }, { "source": "/docs/actions/triggers/post-user-registration/event-object", - "destination": "/docs/customize/actions/explore-triggers/signup-and-login-triggers/post-user-registration-trigger/post-user-registration-event-object" + "destination": "/docs/actions/reference/post-user-registration/post-user-registration-event-object" }, { "source": "/docs/customize/actions/flows-and-triggers/post-user-registration-flow", - "destination": "/docs/customize/actions/explore-triggers/signup-and-login-triggers/post-user-registration-trigger" + "destination": "/docs/customize/actions/explore-triggers/post-user-registration" }, { "source": "/docs/customize/actions/triggers/post-user-registration", - "destination": "/docs/customize/actions/explore-triggers/signup-and-login-triggers/post-user-registration-trigger" + "destination": "/docs/customize/actions/explore-triggers/post-user-registration" }, { "source": "/docs/actions/triggers/post-user-registration", - "destination": "/docs/customize/actions/explore-triggers/signup-and-login-triggers/post-user-registration-trigger" + "destination": "/docs/customize/actions/explore-triggers/post-user-registration" }, { "source": "/docs/customize/actions/flows-and-triggers/post-change-password-flow/api-object", - "destination": "/docs/customize/actions/explore-triggers/password-reset-triggers/post-challenge-trigger/post-challenge-api-object" + "destination": "/docs/actions/reference/password-reset-post-challenge/password-reset-post-challenge-api-object" }, { "source": "/docs/customize/actions/flows-and-triggers/post-change-password-flow/event-object", - "destination": "/docs/customize/actions/explore-triggers/password-reset-triggers/post-challenge-trigger/post-challenge-event-object" + "destination": "/docs/actions/reference/password-reset-post-challenge/password-reset-post-challenge-event-object" }, { "source": "/docs/customize/actions/triggers/post-change-password/event-object", - "destination": "/docs/customize/actions/explore-triggers/password-reset-triggers/post-challenge-trigger/post-challenge-event-object" + "destination": "/docs/actions/reference/password-reset-post-challenge/password-reset-post-challenge-event-object" }, { "source": "/docs/actions/triggers/post-change-password/event-object", - "destination": "/docs/customize/actions/explore-triggers/password-reset-triggers/post-challenge-trigger/post-challenge-event-object" + "destination": "/docs/actions/reference/password-reset-post-challenge/password-reset-post-challenge-event-object" }, { "source": "/docs/customize/actions/flows-and-triggers/post-change-password-flow", - "destination": "/docs/customize/actions/explore-triggers/password-reset-triggers/post-change-password-trigger" + "destination": "/docs/customize/actions/explore-triggers/post-change-password" }, { "source": "/docs/customize/actions/triggers/post-change-password", - "destination": "/docs/customize/actions/explore-triggers/password-reset-triggers/post-change-password-trigger" + "destination": "/docs/customize/actions/explore-triggers/post-change-password" }, { "source": "/docs/actions/triggers/post-change-password", - "destination": "/docs/customize/actions/explore-triggers/password-reset-triggers/post-change-password-trigger" + "destination": "/docs/customize/actions/explore-triggers/post-change-password" }, { "source": "/docs/actions/limitations", @@ -12361,31 +12361,31 @@ }, { "source": "/docs/customize/actions/flows-and-triggers/send-phone-message-flow/api-object", - "destination": "/docs/customize/actions/explore-triggers/mfa-notifications-trigger/send-phone-message-api-object" + "destination": "/docs/actions/reference/send-phone-message/send-phone-message-api-object" }, { "source": "/docs/customize/actions/flows-and-triggers/send-phone-message-flow/event-object", - "destination": "/docs/customize/actions/explore-triggers/mfa-notifications-trigger/send-phone-message-event-object" + "destination": "/docs/actions/reference/send-phone-message/send-phone-message-event-object" }, { "source": "/docs/customize/actions/triggers/send-phone-message/event-object", - "destination": "/docs/customize/actions/explore-triggers/mfa-notifications-trigger/send-phone-message-event-object" + "destination": "/docs/actions/reference/send-phone-message/send-phone-message-event-object" }, { "source": "/docs/actions/triggers/send-phone-message/event-object", - "destination": "/docs/customize/actions/explore-triggers/mfa-notifications-trigger/send-phone-message-event-object" + "destination": "/docs/actions/reference/send-phone-message/send-phone-message-event-object" }, { "source": "/docs/customize/actions/flows-and-triggers/send-phone-message-flow", - "destination": "/docs/customize/actions/explore-triggers/mfa-notifications-trigger" + "destination": "/docs/customize/actions/explore-triggers/send-phone-message" }, { "source": "/docs/customize/actions/triggers/send-phone-message", - "destination": "/docs/customize/actions/explore-triggers/mfa-notifications-trigger" + "destination": "/docs/customize/actions/explore-triggers/send-phone-message" }, { "source": "/docs/actions/triggers/send-phone-message", - "destination": "/docs/customize/actions/explore-triggers/mfa-notifications-trigger" + "destination": "/docs/customize/actions/explore-triggers/send-phone-message" }, { "source": "/docs/customize/actions/manage-action-versions", @@ -12451,6 +12451,230 @@ "source": "/docs/customize/actions", "destination": "/docs/customize/actions/actions-overview" }, + { + "source": "/docs/customize/actions/reference", + "destination": "/docs/actions/reference" + }, + { + "source": "/docs/customize/actions/reference/credentials-exchange/credentials-exchange-event-object", + "destination": "/docs/actions/reference/credentials-exchange/credentials-exchange-event-object" + }, + { + "source": "/docs/customize/actions/reference/credentials-exchange/credentials-exchange-api-object", + "destination": "/docs/actions/reference/credentials-exchange/credentials-exchange-api-object" + }, + { + "source": "/docs/customize/actions/reference/custom-email-provider/custom-email-provider-event-object", + "destination": "/docs/actions/reference/custom-email-provider/custom-email-provider-event-object" + }, + { + "source": "/docs/customize/actions/reference/custom-email-provider/custom-email-provider-api-object", + "destination": "/docs/actions/reference/custom-email-provider/custom-email-provider-api-object" + }, + { + "source": "/docs/customize/actions/reference/custom-phone-provider/custom-phone-provider-event-object", + "destination": "/docs/actions/reference/custom-phone-provider/custom-phone-provider-event-object" + }, + { + "source": "/docs/customize/actions/reference/custom-phone-provider/custom-phone-provider-api-object", + "destination": "/docs/actions/reference/custom-phone-provider/custom-phone-provider-api-object" + }, + { + "source": "/docs/customize/actions/reference/custom-token-exchange/custom-token-exchange-event-object", + "destination": "/docs/actions/reference/custom-token-exchange/custom-token-exchange-event-object" + }, + { + "source": "/docs/customize/actions/reference/custom-token-exchange/custom-token-exchange-api-object", + "destination": "/docs/actions/reference/custom-token-exchange/custom-token-exchange-api-object" + }, + { + "source": "/docs/customize/actions/reference/event-stream/event-stream-event-object", + "destination": "/docs/actions/reference/event-stream/event-stream-event-object" + }, + { + "source": "/docs/customize/actions/reference/event-stream/event-stream-api-object", + "destination": "/docs/actions/reference/event-stream/event-stream-api-object" + }, + { + "source": "/docs/customize/actions/reference/password-reset-post-challenge/password-reset-post-challenge-event-object", + "destination": "/docs/actions/reference/password-reset-post-challenge/password-reset-post-challenge-event-object" + }, + { + "source": "/docs/customize/actions/reference/password-reset-post-challenge/password-reset-post-challenge-api-object", + "destination": "/docs/actions/reference/password-reset-post-challenge/password-reset-post-challenge-api-object" + }, + { + "source": "/docs/customize/actions/reference/post-login/post-login-event-object", + "destination": "/docs/actions/reference/post-login/post-login-event-object" + }, + { + "source": "/docs/customize/actions/reference/post-login/post-login-api-object", + "destination": "/docs/actions/reference/post-login/post-login-api-object" + }, + { + "source": "/docs/customize/actions/reference/post-change-password/post-change-password-event-object", + "destination": "/docs/actions/reference/post-change-password/post-change-password-event-object" + }, + { + "source": "/docs/customize/actions/reference/post-change-password/post-change-password-api-object", + "destination": "/docs/actions/reference/post-change-password/post-change-password-api-object" + }, + { + "source": "/docs/customize/actions/reference/post-user-registration/post-user-registration-event-object", + "destination": "/docs/actions/reference/post-user-registration/post-user-registration-event-object" + }, + { + "source": "/docs/customize/actions/reference/post-user-registration/post-user-registration-api-object", + "destination": "/docs/actions/reference/post-user-registration/post-user-registration-api-object" + }, + { + "source": "/docs/customize/actions/reference/pre-user-registration/pre-user-registration-event-object", + "destination": "/docs/actions/reference/pre-user-registration/pre-user-registration-event-object" + }, + { + "source": "/docs/customize/actions/reference/pre-user-registration/pre-user-registration-api-object", + "destination": "/docs/actions/reference/pre-user-registration/pre-user-registration-api-object" + }, + { + "source": "/docs/customize/actions/reference/send-phone-message/send-phone-message-event-object", + "destination": "/docs/actions/reference/send-phone-message/send-phone-message-event-object" + }, + { + "source": "/docs/customize/actions/reference/send-phone-message/send-phone-message-api-object", + "destination": "/docs/actions/reference/send-phone-message/send-phone-message-api-object" + }, + { + "source": "/docs/customize/actions/explore-triggers/credentials-exchange/credentials-exchange-event-object", + "destination": "/docs/actions/reference/credentials-exchange/credentials-exchange-event-object" + }, + { + "source": "/docs/customize/actions/explore-triggers/credentials-exchange/credentials-exchange-api-object", + "destination": "/docs/actions/reference/credentials-exchange/credentials-exchange-api-object" + }, + { + "source": "/docs/customize/email/smtp-email-providers/custom/action-triggers-custom-email-provider-event-object", + "destination": "/docs/actions/reference/custom-email-provider/custom-email-provider-event-object" + }, + { + "source": "/docs/customize/email/smtp-email-providers/custom/action-triggers-custom-email-provider-api-object", + "destination": "/docs/actions/reference/custom-email-provider/custom-email-provider-api-object" + }, + { + "source": "/docs/customize/phone-messages/configure-phone-messaging-providers/configure-a-custom-phone-provider/action-triggers-custom-phone-provider-api-object", + "destination": "/docs/actions/reference/custom-phone-provider/custom-phone-provider-api-object" + }, + { + "source": "/docs/customize/phone-messages/configure-phone-messaging-providers/configure-a-custom-phone-provider/actions-triggers-custom-phone-provider-event-object", + "destination": "/docs/actions/reference/custom-phone-provider/custom-phone-provider-event-object" + }, + { + "source": "/docs/customize/actions/explore-triggers/signup-and-login-triggers/custom-token-exchange-trigger", + "destination": "/docs/customize/actions/explore-triggers/custom-token-exchange" + }, + { + "source": "/docs/customize/actions/explore-triggers/signup-and-login-triggers/custom-token-exchange-trigger/custom-token-exchange-event-object", + "destination": "/docs/actions/reference/custom-token-exchange/custom-token-exchange-event-object" + }, + { + "source": "/docs/customize/actions/explore-triggers/signup-and-login-triggers/custom-token-exchange-trigger/custom-token-exchange-api-object", + "destination": "/docs/actions/reference/custom-token-exchange/custom-token-exchange-api-object" + }, + { + "source": "/docs/customize/actions/explore-triggers/event-stream-triggers", + "destination": "/docs/customize/actions/explore-triggers/event-stream" + }, + { + "source": "/docs/customize/actions/explore-triggers/event-stream-triggers/event-stream-event-object", + "destination": "/docs/actions/reference/event-stream/event-stream-event-object" + }, + { + "source": "/docs/customize/actions/explore-triggers/event-stream-triggers/event-stream-api-object", + "destination": "/docs/actions/reference/event-stream/event-stream-api-object" + }, + { + "source": "/docs/customize/actions/explore-triggers/password-reset-triggers/post-challenge-trigger", + "destination": "/docs/customize/actions/explore-triggers/password-reset-post-challenge" + }, + { + "source": "/docs/customize/actions/explore-triggers/password-reset-triggers/post-challenge-trigger/post-challenge-event-object", + "destination": "/docs/actions/reference/password-reset-post-challenge/password-reset-post-challenge-event-object" + }, + { + "source": "/docs/customize/actions/explore-triggers/password-reset-triggers/post-challenge-trigger/post-challenge-api-object", + "destination": "/docs/actions/reference/password-reset-post-challenge/password-reset-post-challenge-api-object" + }, + { + "source": "/docs/customize/actions/explore-triggers/password-reset-triggers/post-change-password-trigger", + "destination": "/docs/customize/actions/explore-triggers/post-change-password" + }, + { + "source": "/docs/customize/actions/explore-triggers/password-reset-triggers/post-change-password-trigger/post-change-password-event-object", + "destination": "/docs/actions/reference/post-change-password/post-change-password-event-object" + }, + { + "source": "/docs/customize/actions/explore-triggers/password-reset-triggers/post-change-password-trigger/post-change-password-api-object", + "destination": "/docs/actions/reference/post-change-password/post-change-password-api-object" + }, + { + "source": "/docs/customize/actions/explore-triggers/signup-and-login-triggers/login-trigger", + "destination": "/docs/customize/actions/explore-triggers/post-login" + }, + { + "source": "/docs/customize/actions/explore-triggers/signup-and-login-triggers/login-trigger/post-login-event-object", + "destination": "/docs/actions/reference/post-login/post-login-event-object" + }, + { + "source": "/docs/customize/actions/explore-triggers/signup-and-login-triggers/login-trigger/post-login-api-object", + "destination": "/docs/actions/reference/post-login/post-login-api-object" + }, + { + "source": "/docs/customize/actions/explore-triggers/signup-and-login-triggers/post-user-registration-trigger", + "destination": "/docs/customize/actions/explore-triggers/post-user-registration" + }, + { + "source": "/docs/customize/actions/explore-triggers/signup-and-login-triggers/post-user-registration-trigger/post-user-registration-event-object", + "destination": "/docs/actions/reference/post-user-registration/post-user-registration-event-object" + }, + { + "source": "/docs/customize/actions/explore-triggers/signup-and-login-triggers/post-user-registration-trigger/post-user-registration-api-object", + "destination": "/docs/actions/reference/post-user-registration/post-user-registration-api-object" + }, + { + "source": "/docs/customize/actions/explore-triggers/signup-and-login-triggers/pre-user-registration-trigger", + "destination": "/docs/customize/actions/explore-triggers/pre-user-registration" + }, + { + "source": "/docs/customize/actions/explore-triggers/signup-and-login-triggers/pre-user-registration-trigger/pre-user-registration-event-object", + "destination": "/docs/actions/reference/pre-user-registration/pre-user-registration-event-object" + }, + { + "source": "/docs/customize/actions/explore-triggers/signup-and-login-triggers/pre-user-registration-trigger/pre-user-registration-api-object", + "destination": "/docs/actions/reference/pre-user-registration/pre-user-registration-api-object" + }, + { + "source": "/docs/customize/actions/explore-triggers/mfa-notifications-trigger", + "destination": "/docs/customize/actions/explore-triggers/send-phone-message" + }, + { + "source": "/docs/customize/actions/explore-triggers/mfa-notifications-trigger/send-phone-message-event-object", + "destination": "/docs/actions/reference/send-phone-message/send-phone-message-event-object" + }, + { + "source": "/docs/customize/actions/explore-triggers/mfa-notifications-trigger/send-phone-message-api-object", + "destination": "/docs/actions/reference/send-phone-message/send-phone-message-api-object" + }, + { + "source": "/docs/customize/actions/explore-triggers/signup-and-login-triggers/login-trigger/redirect-with-actions", + "destination": "/docs/customize/actions/redirect-with-actions" + }, + { + "source": "/docs/customize/actions/explore-triggers/signup-and-login-triggers", + "destination": "/docs/customize/actions/explore-triggers" + }, + { + "source": "/docs/customize/actions/explore-triggers/password-reset-triggers", + "destination": "/docs/customize/actions/explore-triggers" + }, { "source": "/docs/authenticate/protocols/scim/configure-inbound-scim/inbound-scim-for-okta-workforce-connections", "destination": "/docs/authenticate/protocols/scim/inbound-scim-for-okta-workforce-connections" diff --git a/main/docs/actions/reference.mdx b/main/docs/actions/reference.mdx new file mode 100644 index 0000000000..fe08e94c52 --- /dev/null +++ b/main/docs/actions/reference.mdx @@ -0,0 +1,21 @@ +--- +title: Actions Reference Overview +sidebarTitle: Overview +description: Reference the event and api objects available to Auth0 Actions for each trigger, detailing the transaction data you can read and the methods you can call from your custom code. +--- + +Every Auth0 Action receives two objects when its trigger fires: + +* The **event object** is read-only transaction context: details about the user, request, client, tenant, and connection at the moment the trigger fired. +* The **api object** exposes the methods your Action can call to change the outcome of the transaction, such as denying access, adding token claims, triggering challenges, or caching data. + +The objects available differ per trigger. Select a trigger below to explore its event and api object reference. To learn when each trigger fires and how to attach Actions to it, read [Explore Triggers](/docs/customize/actions/explore-triggers). + +## Resources + +| Read... | To learn... | +| --- | --- | +| [Actions Overview](/docs/customize/actions/actions-overview) | How Auth0 Actions work and what you can accomplish with them. | +| [Explore Triggers](/docs/customize/actions/explore-triggers) | When each trigger fires and how Actions attach to it. | +| [Actions Coding Guidelines](/docs/customize/actions/action-coding-guidelines) | Write clear, concise, and secure Actions code with our coding guidelines. | +| [Write Your First Action](/docs/customize/actions/write-your-first-action) | How to build, test, and deploy an Action end to end. | diff --git a/main/docs/customize/actions/explore-triggers/machine-to-machine-trigger/credentials-exchange-api-object.mdx b/main/docs/actions/reference/credentials-exchange/credentials-exchange-api-object.mdx similarity index 98% rename from main/docs/customize/actions/explore-triggers/machine-to-machine-trigger/credentials-exchange-api-object.mdx rename to main/docs/actions/reference/credentials-exchange/credentials-exchange-api-object.mdx index 3c86c5b396..bf5755485a 100644 --- a/main/docs/customize/actions/explore-triggers/machine-to-machine-trigger/credentials-exchange-api-object.mdx +++ b/main/docs/actions/reference/credentials-exchange/credentials-exchange-api-object.mdx @@ -4,7 +4,7 @@ # DO NOT EDIT MANUALLY. # description: Learn about the credentials-exchange Action trigger's API object. -title: 'Actions Triggers: credentials-exchange - API Object' +title: 'API Object' validatedOn: 2026-05-26 --- diff --git a/main/docs/customize/actions/explore-triggers/machine-to-machine-trigger/credentials-exchange-event-object.mdx b/main/docs/actions/reference/credentials-exchange/credentials-exchange-event-object.mdx similarity index 99% rename from main/docs/customize/actions/explore-triggers/machine-to-machine-trigger/credentials-exchange-event-object.mdx rename to main/docs/actions/reference/credentials-exchange/credentials-exchange-event-object.mdx index e98545e696..281f014dcc 100644 --- a/main/docs/customize/actions/explore-triggers/machine-to-machine-trigger/credentials-exchange-event-object.mdx +++ b/main/docs/actions/reference/credentials-exchange/credentials-exchange-event-object.mdx @@ -4,7 +4,7 @@ # DO NOT EDIT MANUALLY. # description: Learn about the credentials-exchange Action trigger's event object, which provides contextual information about the trigger execution. -title: 'Actions Triggers: credentials-exchange - Event Object' +title: 'Event Object' validatedOn: 2026-05-26 --- diff --git a/main/docs/customize/email/smtp-email-providers/custom/action-triggers-custom-email-provider-api-object.mdx b/main/docs/actions/reference/custom-email-provider/custom-email-provider-api-object.mdx similarity index 95% rename from main/docs/customize/email/smtp-email-providers/custom/action-triggers-custom-email-provider-api-object.mdx rename to main/docs/actions/reference/custom-email-provider/custom-email-provider-api-object.mdx index 8eee12ec7e..8207793c78 100644 --- a/main/docs/customize/email/smtp-email-providers/custom/action-triggers-custom-email-provider-api-object.mdx +++ b/main/docs/actions/reference/custom-email-provider/custom-email-provider-api-object.mdx @@ -3,8 +3,8 @@ # THIS FILE IS AUTO-GENERATED. # DO NOT EDIT MANUALLY. # -description: Learn about the custom-email-provider Action trigger's API object. -title: 'Actions Triggers: custom-email-provider - API Object' +description: Reference the custom-email-provider Action trigger API object, which includes methods to deliver or drop email notifications through your provider. +title: 'API Object' validatedOn: 2026-05-22 --- diff --git a/main/docs/customize/email/smtp-email-providers/custom/action-triggers-custom-email-provider-event-object.mdx b/main/docs/actions/reference/custom-email-provider/custom-email-provider-event-object.mdx similarity index 99% rename from main/docs/customize/email/smtp-email-providers/custom/action-triggers-custom-email-provider-event-object.mdx rename to main/docs/actions/reference/custom-email-provider/custom-email-provider-event-object.mdx index 797fab78ca..24dabe98b9 100644 --- a/main/docs/customize/email/smtp-email-providers/custom/action-triggers-custom-email-provider-event-object.mdx +++ b/main/docs/actions/reference/custom-email-provider/custom-email-provider-event-object.mdx @@ -4,7 +4,7 @@ # DO NOT EDIT MANUALLY. # description: Learn about the custom-email-provider Action trigger's event object, which provides contextual information about the trigger execution. -title: 'Actions Triggers: custom-email-provider - Event Object' +title: 'Event Object' validatedOn: 2026-04-28 --- diff --git a/main/docs/customize/phone-messages/configure-phone-messaging-providers/configure-a-custom-phone-provider/action-triggers-custom-phone-provider-api-object.mdx b/main/docs/actions/reference/custom-phone-provider/custom-phone-provider-api-object.mdx similarity index 95% rename from main/docs/customize/phone-messages/configure-phone-messaging-providers/configure-a-custom-phone-provider/action-triggers-custom-phone-provider-api-object.mdx rename to main/docs/actions/reference/custom-phone-provider/custom-phone-provider-api-object.mdx index 164c10b792..ecccc272ff 100644 --- a/main/docs/customize/phone-messages/configure-phone-messaging-providers/configure-a-custom-phone-provider/action-triggers-custom-phone-provider-api-object.mdx +++ b/main/docs/actions/reference/custom-phone-provider/custom-phone-provider-api-object.mdx @@ -3,8 +3,8 @@ # THIS FILE IS AUTO-GENERATED. # DO NOT EDIT MANUALLY. # -description: Learn about the custom-phone-provider Action trigger's API object. -title: 'Actions Triggers: custom-phone-provider - API Object' +description: Reference the custom-phone-provider Action trigger API object, which includes methods to send SMS and voice messages through your provider. +title: 'API Object' validatedOn: 2026-05-22 --- diff --git a/main/docs/customize/phone-messages/configure-phone-messaging-providers/configure-a-custom-phone-provider/actions-triggers-custom-phone-provider-event-object.mdx b/main/docs/actions/reference/custom-phone-provider/custom-phone-provider-event-object.mdx similarity index 99% rename from main/docs/customize/phone-messages/configure-phone-messaging-providers/configure-a-custom-phone-provider/actions-triggers-custom-phone-provider-event-object.mdx rename to main/docs/actions/reference/custom-phone-provider/custom-phone-provider-event-object.mdx index 9b3980148e..cebbe2911c 100644 --- a/main/docs/customize/phone-messages/configure-phone-messaging-providers/configure-a-custom-phone-provider/actions-triggers-custom-phone-provider-event-object.mdx +++ b/main/docs/actions/reference/custom-phone-provider/custom-phone-provider-event-object.mdx @@ -4,7 +4,7 @@ # DO NOT EDIT MANUALLY. # description: Learn about the custom-phone-provider Action trigger's event object, which provides contextual information about the trigger execution. -title: 'Actions Triggers: custom-phone-provider - Event Object' +title: 'Event Object' validatedOn: 2026-04-28 --- diff --git a/main/docs/customize/actions/explore-triggers/signup-and-login-triggers/custom-token-exchange-trigger/custom-token-exchange-api-object.mdx b/main/docs/actions/reference/custom-token-exchange/custom-token-exchange-api-object.mdx similarity index 99% rename from main/docs/customize/actions/explore-triggers/signup-and-login-triggers/custom-token-exchange-trigger/custom-token-exchange-api-object.mdx rename to main/docs/actions/reference/custom-token-exchange/custom-token-exchange-api-object.mdx index 0960c93487..6e5e9a73fa 100644 --- a/main/docs/customize/actions/explore-triggers/signup-and-login-triggers/custom-token-exchange-trigger/custom-token-exchange-api-object.mdx +++ b/main/docs/actions/reference/custom-token-exchange/custom-token-exchange-api-object.mdx @@ -4,7 +4,7 @@ # DO NOT EDIT MANUALLY. # description: Learn about the custom-token-exchange Action trigger's API object. -title: 'Actions Triggers: custom-token-exchange - API Object' +title: 'API Object' validatedOn: 2026-06-03 --- diff --git a/main/docs/customize/actions/explore-triggers/signup-and-login-triggers/custom-token-exchange-trigger/custom-token-exchange-event-object.mdx b/main/docs/actions/reference/custom-token-exchange/custom-token-exchange-event-object.mdx similarity index 99% rename from main/docs/customize/actions/explore-triggers/signup-and-login-triggers/custom-token-exchange-trigger/custom-token-exchange-event-object.mdx rename to main/docs/actions/reference/custom-token-exchange/custom-token-exchange-event-object.mdx index 3e81976669..5cf13e6384 100644 --- a/main/docs/customize/actions/explore-triggers/signup-and-login-triggers/custom-token-exchange-trigger/custom-token-exchange-event-object.mdx +++ b/main/docs/actions/reference/custom-token-exchange/custom-token-exchange-event-object.mdx @@ -4,7 +4,7 @@ # DO NOT EDIT MANUALLY. # description: Learn about the custom-token-exchange Action trigger's event object, which provides contextual information about the trigger execution. -title: 'Actions Triggers: custom-token-exchange - Event Object' +title: 'Event Object' validatedOn: 2026-05-22 --- diff --git a/main/docs/customize/actions/explore-triggers/event-stream-triggers/event-stream-api-object.mdx b/main/docs/actions/reference/event-stream/event-stream-api-object.mdx similarity index 98% rename from main/docs/customize/actions/explore-triggers/event-stream-triggers/event-stream-api-object.mdx rename to main/docs/actions/reference/event-stream/event-stream-api-object.mdx index 5b3c8ad86c..027edf9b64 100644 --- a/main/docs/customize/actions/explore-triggers/event-stream-triggers/event-stream-api-object.mdx +++ b/main/docs/actions/reference/event-stream/event-stream-api-object.mdx @@ -4,7 +4,7 @@ # DO NOT EDIT MANUALLY. # description: Learn about the event-stream Action trigger's API object. -title: 'Actions Triggers: event-stream - API Object' +title: 'API Object' validatedOn: 2026-05-26 --- diff --git a/main/docs/customize/actions/explore-triggers/event-stream-triggers/event-stream-event-object.mdx b/main/docs/actions/reference/event-stream/event-stream-event-object.mdx similarity index 96% rename from main/docs/customize/actions/explore-triggers/event-stream-triggers/event-stream-event-object.mdx rename to main/docs/actions/reference/event-stream/event-stream-event-object.mdx index c13d2f1445..19972b574f 100644 --- a/main/docs/customize/actions/explore-triggers/event-stream-triggers/event-stream-event-object.mdx +++ b/main/docs/actions/reference/event-stream/event-stream-event-object.mdx @@ -4,7 +4,7 @@ # DO NOT EDIT MANUALLY. # description: Learn about the event-stream Action trigger's event object, which provides contextual information about the trigger execution. -title: 'Actions Triggers: event-stream - Event Object' +title: 'Event Object' validatedOn: 2026-05-26 --- diff --git a/main/docs/customize/actions/explore-triggers/password-reset-triggers/post-challenge-trigger/post-challenge-api-object.mdx b/main/docs/actions/reference/password-reset-post-challenge/password-reset-post-challenge-api-object.mdx similarity index 99% rename from main/docs/customize/actions/explore-triggers/password-reset-triggers/post-challenge-trigger/post-challenge-api-object.mdx rename to main/docs/actions/reference/password-reset-post-challenge/password-reset-post-challenge-api-object.mdx index 845b1435ce..f802dca7ba 100644 --- a/main/docs/customize/actions/explore-triggers/password-reset-triggers/post-challenge-trigger/post-challenge-api-object.mdx +++ b/main/docs/actions/reference/password-reset-post-challenge/password-reset-post-challenge-api-object.mdx @@ -4,7 +4,7 @@ # DO NOT EDIT MANUALLY. # description: Learn about the password-reset-post-challenge Action trigger's API object. -title: 'Actions Triggers: password-reset-post-challenge - API Object' +title: 'API Object' validatedOn: 2026-05-22 --- diff --git a/main/docs/customize/actions/explore-triggers/password-reset-triggers/post-challenge-trigger/post-challenge-event-object.mdx b/main/docs/actions/reference/password-reset-post-challenge/password-reset-post-challenge-event-object.mdx similarity index 99% rename from main/docs/customize/actions/explore-triggers/password-reset-triggers/post-challenge-trigger/post-challenge-event-object.mdx rename to main/docs/actions/reference/password-reset-post-challenge/password-reset-post-challenge-event-object.mdx index 82b0467f1f..9381602461 100644 --- a/main/docs/customize/actions/explore-triggers/password-reset-triggers/post-challenge-trigger/post-challenge-event-object.mdx +++ b/main/docs/actions/reference/password-reset-post-challenge/password-reset-post-challenge-event-object.mdx @@ -4,7 +4,7 @@ # DO NOT EDIT MANUALLY. # description: Learn about the password-reset-post-challenge Action trigger's event object, which provides contextual information about the trigger execution. -title: 'Actions Triggers: password-reset-post-challenge - Event Object' +title: 'Event Object' validatedOn: 2026-05-25 --- diff --git a/main/docs/customize/actions/explore-triggers/password-reset-triggers/post-change-password-trigger/post-change-password-api-object.mdx b/main/docs/actions/reference/post-change-password/post-change-password-api-object.mdx similarity index 97% rename from main/docs/customize/actions/explore-triggers/password-reset-triggers/post-change-password-trigger/post-change-password-api-object.mdx rename to main/docs/actions/reference/post-change-password/post-change-password-api-object.mdx index 5983d46bb1..b34ffdfb91 100644 --- a/main/docs/customize/actions/explore-triggers/password-reset-triggers/post-change-password-trigger/post-change-password-api-object.mdx +++ b/main/docs/actions/reference/post-change-password/post-change-password-api-object.mdx @@ -4,7 +4,7 @@ # DO NOT EDIT MANUALLY. # description: Learn about the post-change-password Action trigger's API object. -title: 'Actions Triggers: post-change-password - API Object' +title: 'API Object' validatedOn: 2026-05-22 --- diff --git a/main/docs/customize/actions/explore-triggers/password-reset-triggers/post-change-password-trigger/post-change-password-event-object.mdx b/main/docs/actions/reference/post-change-password/post-change-password-event-object.mdx similarity index 99% rename from main/docs/customize/actions/explore-triggers/password-reset-triggers/post-change-password-trigger/post-change-password-event-object.mdx rename to main/docs/actions/reference/post-change-password/post-change-password-event-object.mdx index 422c9bc2e7..eea1262403 100644 --- a/main/docs/customize/actions/explore-triggers/password-reset-triggers/post-change-password-trigger/post-change-password-event-object.mdx +++ b/main/docs/actions/reference/post-change-password/post-change-password-event-object.mdx @@ -4,7 +4,7 @@ # DO NOT EDIT MANUALLY. # description: Learn about the post-change-password Action trigger's event object, which provides contextual information about the trigger execution. -title: 'Actions Triggers: post-change-password - Event Object' +title: 'Event Object' validatedOn: 2026-05-25 --- diff --git a/main/docs/customize/actions/explore-triggers/signup-and-login-triggers/login-trigger/post-login-api-object.mdx b/main/docs/actions/reference/post-login/post-login-api-object.mdx similarity index 99% rename from main/docs/customize/actions/explore-triggers/signup-and-login-triggers/login-trigger/post-login-api-object.mdx rename to main/docs/actions/reference/post-login/post-login-api-object.mdx index f5f08c3835..cba8c0d5ab 100644 --- a/main/docs/customize/actions/explore-triggers/signup-and-login-triggers/login-trigger/post-login-api-object.mdx +++ b/main/docs/actions/reference/post-login/post-login-api-object.mdx @@ -4,7 +4,7 @@ # DO NOT EDIT MANUALLY. # description: Learn about the post-login Action trigger's API object. -title: 'Actions Triggers: post-login - API Object' +title: 'API Object' validatedOn: 2026-06-03 --- diff --git a/main/docs/customize/actions/explore-triggers/signup-and-login-triggers/login-trigger/post-login-event-object.mdx b/main/docs/actions/reference/post-login/post-login-event-object.mdx similarity index 99% rename from main/docs/customize/actions/explore-triggers/signup-and-login-triggers/login-trigger/post-login-event-object.mdx rename to main/docs/actions/reference/post-login/post-login-event-object.mdx index 897a3752dd..c3197edb8e 100644 --- a/main/docs/customize/actions/explore-triggers/signup-and-login-triggers/login-trigger/post-login-event-object.mdx +++ b/main/docs/actions/reference/post-login/post-login-event-object.mdx @@ -4,7 +4,7 @@ # DO NOT EDIT MANUALLY. # description: Learn about the post-login Action trigger's event object, which provides contextual information about the trigger execution. -title: 'Actions Triggers: post-login - Event Object' +title: 'Event Object' validatedOn: 2026-05-25 --- diff --git a/main/docs/customize/actions/explore-triggers/signup-and-login-triggers/post-user-registration-trigger/post-user-registration-api-object.mdx b/main/docs/actions/reference/post-user-registration/post-user-registration-api-object.mdx similarity index 97% rename from main/docs/customize/actions/explore-triggers/signup-and-login-triggers/post-user-registration-trigger/post-user-registration-api-object.mdx rename to main/docs/actions/reference/post-user-registration/post-user-registration-api-object.mdx index 78a98f4153..7fa0b7536e 100644 --- a/main/docs/customize/actions/explore-triggers/signup-and-login-triggers/post-user-registration-trigger/post-user-registration-api-object.mdx +++ b/main/docs/actions/reference/post-user-registration/post-user-registration-api-object.mdx @@ -4,7 +4,7 @@ # DO NOT EDIT MANUALLY. # description: Learn about the post-user-registration Action trigger's API object. -title: 'Actions Triggers: post-user-registration - API Object' +title: 'API Object' validatedOn: 2026-05-22 --- diff --git a/main/docs/customize/actions/explore-triggers/signup-and-login-triggers/post-user-registration-trigger/post-user-registration-event-object.mdx b/main/docs/actions/reference/post-user-registration/post-user-registration-event-object.mdx similarity index 99% rename from main/docs/customize/actions/explore-triggers/signup-and-login-triggers/post-user-registration-trigger/post-user-registration-event-object.mdx rename to main/docs/actions/reference/post-user-registration/post-user-registration-event-object.mdx index 25410c6013..8ada095404 100644 --- a/main/docs/customize/actions/explore-triggers/signup-and-login-triggers/post-user-registration-trigger/post-user-registration-event-object.mdx +++ b/main/docs/actions/reference/post-user-registration/post-user-registration-event-object.mdx @@ -4,7 +4,7 @@ # DO NOT EDIT MANUALLY. # description: Learn about the post-user-registration Action trigger's event object, which provides contextual information about the trigger execution. -title: 'Actions Triggers: post-user-registration - Event Object' +title: 'Event Object' validatedOn: 2026-05-25 --- diff --git a/main/docs/customize/actions/explore-triggers/signup-and-login-triggers/pre-user-registration-trigger/pre-user-registration-api-object.mdx b/main/docs/actions/reference/pre-user-registration/pre-user-registration-api-object.mdx similarity index 98% rename from main/docs/customize/actions/explore-triggers/signup-and-login-triggers/pre-user-registration-trigger/pre-user-registration-api-object.mdx rename to main/docs/actions/reference/pre-user-registration/pre-user-registration-api-object.mdx index 44bbf82171..dfaf7da013 100644 --- a/main/docs/customize/actions/explore-triggers/signup-and-login-triggers/pre-user-registration-trigger/pre-user-registration-api-object.mdx +++ b/main/docs/actions/reference/pre-user-registration/pre-user-registration-api-object.mdx @@ -4,7 +4,7 @@ # DO NOT EDIT MANUALLY. # description: Learn about the pre-user-registration Action trigger's API object. -title: 'Actions Triggers: pre-user-registration - API Object' +title: 'API Object' validatedOn: 2026-05-22 --- diff --git a/main/docs/customize/actions/explore-triggers/signup-and-login-triggers/pre-user-registration-trigger/pre-user-registration-event-object.mdx b/main/docs/actions/reference/pre-user-registration/pre-user-registration-event-object.mdx similarity index 99% rename from main/docs/customize/actions/explore-triggers/signup-and-login-triggers/pre-user-registration-trigger/pre-user-registration-event-object.mdx rename to main/docs/actions/reference/pre-user-registration/pre-user-registration-event-object.mdx index d1b3d37e10..e3a2f952c9 100644 --- a/main/docs/customize/actions/explore-triggers/signup-and-login-triggers/pre-user-registration-trigger/pre-user-registration-event-object.mdx +++ b/main/docs/actions/reference/pre-user-registration/pre-user-registration-event-object.mdx @@ -4,7 +4,7 @@ # DO NOT EDIT MANUALLY. # description: Learn about the pre-user-registration Action trigger's event object, which provides contextual information about the trigger execution. -title: 'Actions Triggers: pre-user-registration - Event Object' +title: 'Event Object' validatedOn: 2026-05-25 --- diff --git a/main/docs/customize/actions/explore-triggers/mfa-notifications-trigger/send-phone-message-api-object.mdx b/main/docs/actions/reference/send-phone-message/send-phone-message-api-object.mdx similarity index 98% rename from main/docs/customize/actions/explore-triggers/mfa-notifications-trigger/send-phone-message-api-object.mdx rename to main/docs/actions/reference/send-phone-message/send-phone-message-api-object.mdx index c9cb001ed4..0f9c0dc9a6 100644 --- a/main/docs/customize/actions/explore-triggers/mfa-notifications-trigger/send-phone-message-api-object.mdx +++ b/main/docs/actions/reference/send-phone-message/send-phone-message-api-object.mdx @@ -4,7 +4,7 @@ # DO NOT EDIT MANUALLY. # description: Learn about the send-phone-message Action trigger's API object. -title: 'Actions Triggers: send-phone-message - API Object' +title: 'API Object' validatedOn: 2026-05-22 --- diff --git a/main/docs/customize/actions/explore-triggers/mfa-notifications-trigger/send-phone-message-event-object.mdx b/main/docs/actions/reference/send-phone-message/send-phone-message-event-object.mdx similarity index 99% rename from main/docs/customize/actions/explore-triggers/mfa-notifications-trigger/send-phone-message-event-object.mdx rename to main/docs/actions/reference/send-phone-message/send-phone-message-event-object.mdx index 7051e6ebfc..6bae86f7e4 100644 --- a/main/docs/customize/actions/explore-triggers/mfa-notifications-trigger/send-phone-message-event-object.mdx +++ b/main/docs/actions/reference/send-phone-message/send-phone-message-event-object.mdx @@ -4,7 +4,7 @@ # DO NOT EDIT MANUALLY. # description: Learn about the send-phone-message Action trigger's event object, which provides contextual information about the trigger execution. -title: 'Actions Triggers: send-phone-message - Event Object' +title: 'Event Object' validatedOn: 2026-04-28 --- diff --git a/main/docs/customize/actions/actions-reference.mdx b/main/docs/customize/actions/actions-reference.mdx new file mode 100644 index 0000000000..18a34058d1 --- /dev/null +++ b/main/docs/customize/actions/actions-reference.mdx @@ -0,0 +1,16 @@ +--- +title: Actions Reference +description: Browse the Actions Reference catalog to explore the event and api objects available to Auth0 Actions for each trigger, now located under Dev Tools. +--- + +The Actions Reference documents the **event object** (read-only transaction context) and **api object** (methods for changing transaction behavior) available to your custom code for each Actions trigger. + +The reference now lives in its own catalog under **Dev Tools**, alongside the APIs, SDKs, and Events Catalog references. + + + + Explore the event and api object reference for all Actions triggers. Opens in a new tab. + + + +To learn when each trigger fires and how Actions attach to it, read [Explore Triggers](/docs/customize/actions/explore-triggers). diff --git a/main/docs/customize/actions/explore-triggers/credentials-exchange.mdx b/main/docs/customize/actions/explore-triggers/credentials-exchange.mdx new file mode 100644 index 0000000000..ea6b4a04b3 --- /dev/null +++ b/main/docs/customize/actions/explore-triggers/credentials-exchange.mdx @@ -0,0 +1,52 @@ +--- +title: "Credentials Exchange" +description: Learn about Credentials Exchange Actions, which run when an Access Token is issued as part of the Machine to Machine Flow. They can be used to deny the exchange or add custom claims to the access token. +--- +The `credentials-exchange` trigger runs when an Access Token is being issued via the [Client Credentials Flow](/docs/get-started/authentication-and-authorization-flow/client-credentials-flow), before the access token is returned. + +![Diagram showing the Actions Machine to Machine Flow and when the triggers inside of it run.](/docs/images/cdy7uua7fh8z/1JPl54LFWCUh5StuglZS2o/41f89372526574c3b8cdac4d5ba38072/Machine_to_Machine_Flow.png) + +Actions in this flow are blocking (synchronous): they execute as part of the trigger's process and prevent the rest of the Auth0 pipeline from running until the Action completes. + +## References + +* [Event object](/docs/customize/actions/reference/credentials-exchange/credentials-exchange-event-object): Provides contextual information about the request for a client credentials exchange. +* [API object](/docs/customize/actions/reference/credentials-exchange/credentials-exchange-api-object): Provides methods for changing the behavior of the flow. + +## Common use cases + +### Access control + +A credentials-exchange Action can be used to deny an access token based on custom logic: + +```javascript lines +/** + * @param {Event} event - Details about client credentials grant request. + * @param {CredentialsExchangeAPI} api - Interface whose methods can be used to change the behavior of client credentials grant. + */ +exports.onExecuteCredentialsExchange = async (event, api) => { + if (event.request.geoip.continentCode === "NA") { + api.access.deny('invalid_request', "Access from North America is not allowed."); + } +}; +``` + +### Add custom claims to the access token + +A credentials-exchange Action can be used to add custom claims to an access token: + +```javascript lines +/** + * @param {Event} event - Details about client credentials grant request. + * @param {CredentialsExchangeAPI} api - Interface whose methods can be used to change the behavior of client credentials grant. + */ +exports.onExecuteCredentialsExchange = async (event, api) => { + api.accessToken.setCustomClaim("https://my-api.exampleco.com/request-ip", event.request.ip); +}; +``` + + + +We strongly recommend using a namespaced custom claim in the form of a URI. To learn more about namespaced and non-namespaced custom claims, read [Create Custom Claims](/docs/secure/tokens/json-web-tokens/create-custom-claims). + + \ No newline at end of file diff --git a/main/docs/customize/actions/explore-triggers/custom-token-exchange.mdx b/main/docs/customize/actions/explore-triggers/custom-token-exchange.mdx new file mode 100644 index 0000000000..58d27c133d --- /dev/null +++ b/main/docs/customize/actions/explore-triggers/custom-token-exchange.mdx @@ -0,0 +1,47 @@ +--- +title: "Custom Token Exchange" +description: Learn about Custom Token Exchange Actions, which run when the Auth0 Authorization Server receives a Custom Token Exchange request to log a user in. +--- + + + +Custom Token Exchange (CTE) is currently available in Early Access for all Auth0 B2C Professional, B2B Professional, and Enterprise customers. By using this feature, you agree to the applicable Free Trial terms in [Okta's Master Subscription Agreement](https://www.okta.com/legal/). To learn more about Auth0's product release cycle, read [Product Release Stages](/docs/troubleshoot/product-lifecycle/product-release-stages). To learn more about subscription types, review the Auth0 [pricing](https://auth0.com/pricing) page. + + + +The `custom-token-exchange` trigger is the first step in the Auth0 pipeline. After the Auth0 Authorization Server validates that the Custom Token Exchange request is valid and maps to an existing [Custom Token Exchange Profile](/docs/authenticate/custom-token-exchange/configure-custom-token-exchange#create-custom-token-exchange-profile), the trigger executes the single Action associated with that profile. If the Action successfully completes and sets a user for the transaction, `post-login` Actions and the rest of the Auth0 pipeline are then executed for that logged-in user. + +![Diagram showing the Actions Custom Token Exchange trigger flow.](/docs/images/custom-token-exchange/cte_trigger_flow.png) + +Actions in this flow are blocking (synchronous): they execute as part of the trigger's process and prevent the rest of the Auth0 pipeline from running until the Action completes. + +## Custom Token Exchange vs Post Login Actions + +The Post Login Actions trigger executes after the Custom Token Exchange Action runs for the user you set for the transaction. For other use cases, such as adding custom claims to access tokens, use the [Post Login Action trigger](/docs/customize/actions/explore-triggers/post-login). + +The Custom Token Exchange uses the token exchange grant type, where the `event.transaction.protocol` is set to `oauth2-token-exchange` in the Post Login Action trigger. Both the Custom Token Exchange and Native Social Login use the token exchange grant type. To distinguish between the two, use the value of the `subject_token_type`, which should correspond to one of your Custom Token Exchange Profiles. + + + +Custom Token Exchange Early Access doesn't support `api.authentication.challengeWith()` or `api.authentication.enrollWith()`. If you use those methods with your Post-Login Actions, the transaction will fail with a non-recoverable error. Make sure you skip those two methods when `event.transaction.protocol === 'oauth2-token-exchange'` depending on the `subject_token_type` value. + + + +## Actor support for delegation + +The `custom-token-exchange` trigger supports delegated authorization scenarios. The Action can call [`api.authentication.setActor()`](/docs/customize/actions/reference/custom-token-exchange/custom-token-exchange-api-object#api-authentication-setactor-actor) to include an `act` claim in issued tokens, identifying the principal acting on behalf of the subject user. + +`setActor()` can be called regardless of whether the request includes an `actor_token`. The `actor_token` parameter is one way for the calling application to pass actor information to the Action, but the actor identity can also be embedded in the `subject_token` itself or obtained through other custom means within the Action code. + +When the request does include `actor_token` and `actor_token_type`, these values are available in [`event.transaction`](/docs/customize/actions/reference/custom-token-exchange/custom-token-exchange-event-object#event-transaction). If `actor_token_type` is `urn:ietf:params:oauth:token-type:id_token` and the token is a valid Auth0 ID token from the same tenant, the server automatically validates the token and populates `event.transaction.actor_token_user` with the actor's user profile. + +The `act` claim set via `setActor()` is also available in Post-Login Actions via [`event.transaction.actor`](/docs/customize/actions/reference/post-login/post-login-event-object#event-transaction). + +## References + +* [Event object](/docs/customize/actions/reference/custom-token-exchange/custom-token-exchange-event-object): Provides contextual information about the Token Exchange request, including the `subject_token`, IP address, client, and more. +* [API object](/docs/customize/actions/reference/custom-token-exchange/custom-token-exchange-api-object): Provides methods to use with your Token Exchange Action that allow you to set the user, set the actor for delegation, reject the transaction, set user metadata, access the Actions cache, and more. + +## Common use cases + +To learn about common Custom Token Exchange use cases, read [Example Use Cases](/docs/authenticate/custom-token-exchange/cte-example-use-cases). \ No newline at end of file diff --git a/main/docs/customize/actions/explore-triggers/event-stream-triggers.mdx b/main/docs/customize/actions/explore-triggers/event-stream-triggers.mdx deleted file mode 100644 index 188213dcf5..0000000000 --- a/main/docs/customize/actions/explore-triggers/event-stream-triggers.mdx +++ /dev/null @@ -1,59 +0,0 @@ ---- -title: Event Stream Triggers -description: Understand how Auth0 Event Stream Actions run asynchronously to forward events to external services without slowing down user logins. -sidebarTitle: Overview ---- - -Event Stream Actions are logic-based functions that execute asynchronously when specific events occur within your Auth0 tenant. These are non-blocking actions and won't impact the latency of your user's experience. - -Each Event Stream Action is associated with an Event Stream, and listens for a pre-defined set of Event Types (for example, successful logins, password changes, or user deletions). When a subscribed event occurs, the Action is triggered. Unlike Login or Pre-Registration Actions, Event Stream Actions run in the background and do not affect the primary transaction of the user. - -![Diagram showing the TBD.](/docs/images/customize/actions/event-stream-triggers.svg) - -These Actions are non-blocking (asynchronous), suscribed to a specific set of [Event Types](/docs/customize/events/event-types). - -## Triggers - -### Event Stream - -The `event-stream` Actions are functions executed when subscribed Event Types happen. - -#### References - -* [Event object](/docs/customize/actions/explore-triggers/event-stream-triggers/event-stream-event-object): Provides context for both Event Stream message and Action execution. -* [API object](/docs/customize/actions/explore-triggers/event-stream-triggers/event-stream-api-object): Provides methods to modify the flow behavior. - -## Use cases - -### Synchronization - -A event-stream Action can be used to communicate a particular event to an external service based on custom logic. The following Action demonstrates how to securely forward an event message to an external service using a stored API key. - -```javascript lines -/** -* Handler to be executed while processing events in an Event Stream. -* @param {Event} event - Details about the incoming event. -* @param {EventStreamAPI} api - Methods and utilities to define event stream processing. -*/ -exports.onExecuteEventStream = async (event, api) => { - const message = event.message; - - try { - await fetch(event.secrets.URL, { - method: 'POST', - headers: { - 'X-API-Key': event.secrets.API_KEY, - }, - body: JSON.stringify(message), - }); - } catch (err) { - throw new Error('External service failure'); - } - - return; -}; -``` - -To learn more about writing Actions, read [Write Your First Action](/docs/customize/actions/write-your-first-action). - -To learn more about creating an Event Stream, read [Create an Event Stream](/docs/customize/events/create-an-event-stream#create-an-event-stream-actions). diff --git a/main/docs/customize/actions/explore-triggers/event-stream.mdx b/main/docs/customize/actions/explore-triggers/event-stream.mdx new file mode 100644 index 0000000000..ec48501c10 --- /dev/null +++ b/main/docs/customize/actions/explore-triggers/event-stream.mdx @@ -0,0 +1,49 @@ +--- +title: "Event Stream" +description: Learn about Event Stream Actions, which run asynchronously when subscribed event types occur within your Auth0 tenant. They can be used to forward events to external systems without affecting the user's transaction. +--- +The `event-stream` trigger runs when specific events occur within your Auth0 tenant. Each Event Stream Action is associated with an Event Stream and listens for a pre-defined set of [Event Types](/docs/customize/events/event-types) (for example, successful logins, password changes, or user deletions). When a subscribed event occurs, the Action is triggered. Unlike Login or Pre-Registration Actions, Event Stream Actions run in the background and do not affect the primary transaction of the user. + +![Diagram showing how Event Stream Actions subscribe to and process tenant events.](/docs/images/customize/actions/event-stream-triggers.svg) + +Actions in this flow are non-blocking (asynchronous): the Auth0 pipeline continues to run without waiting for the Action to finish, so the Action's outcome does not affect the Auth0 transaction and won't impact the latency of your user's experience. + +## References + +* [Event object](/docs/customize/actions/reference/event-stream/event-stream-event-object): Provides context for both the Event Stream message and the Action execution. +* [API object](/docs/customize/actions/reference/event-stream/event-stream-api-object): Provides methods for changing the behavior of the flow. + +## Common use cases + +### Synchronize events to an external service + +An event-stream Action can be used to communicate a particular event to an external service based on custom logic. The following Action demonstrates how to securely forward an event message to an external service using a stored API key: + +```javascript lines +/** + * @param {Event} event - Details about the incoming event. + * @param {EventStreamAPI} api - Methods and utilities to define event stream processing. + */ +exports.onExecuteEventStream = async (event, api) => { + const message = event.message; + + try { + await fetch(event.secrets.URL, { + method: 'POST', + headers: { + 'X-API-Key': event.secrets.API_KEY, + }, + body: JSON.stringify(message), + }); + } catch (err) { + throw new Error('External service failure'); + } + + return; +}; +``` + +## Learn more + +* [Write Your First Action](/docs/customize/actions/write-your-first-action) +* [Create an Event Stream](/docs/customize/events/create-an-event-stream#create-an-event-stream-actions) \ No newline at end of file diff --git a/main/docs/customize/actions/explore-triggers/machine-to-machine-trigger.mdx b/main/docs/customize/actions/explore-triggers/machine-to-machine-trigger.mdx deleted file mode 100644 index 46b1ac0dd8..0000000000 --- a/main/docs/customize/actions/explore-triggers/machine-to-machine-trigger.mdx +++ /dev/null @@ -1,68 +0,0 @@ ---- -description: Learn about the Actions Machine to Machine Flow and the credentials-exchange Action trigger, which runs as part of the Machine to Machine Flow. -title: Machine to Machine Triggers ---- -The Machine to Machine trigger runs when an Access Token is being issued via the [Client Credentials Flow](/docs/get-started/authentication-and-authorization-flow/client-credentials-flow). - -![Diagram showing the Actions Machine to Machine Flow and when the triggers inside of it run.](/docs/images/cdy7uua7fh8z/1JPl54LFWCUh5StuglZS2o/41f89372526574c3b8cdac4d5ba38072/Machine_to_Machine_Flow.png) - -Actions in this flow are blocking (synchronous), which means they execute as part of a trigger's process and will prevent the rest of the Auth0 pipeline from running until the Action is complete. - -## Triggers - -### M2M / Client Credentials - -The `credentials-exchange` trigger is a function executed before the access token is returned. - -#### References - -* [Event object](/docs/customize/actions/explore-triggers/machine-to-machine-trigger/credentials-exchange-event-object): Provides contextual information about the request for a client credentials exchange. -* [API object](/docs/customize/actions/explore-triggers/machine-to-machine-trigger/credentials-exchange-api-object): Provides methods for changing the behavior of the flow. - -## Common use cases - -### Access control - -A credentials-exchange Action can be used to deny an access token based on custom logic. - -```javascript lines -/** - * @param {Event} event - Details about client credentials grant request. - * @param {CredentialsExchangeAPI} api - Interface whose methods can be used to change the behavior of client credentials grant. - */ -exports.onExecuteCredentialsExchange = async (event, api) => { - if (event.request.geoip.continentCode === "NA") { - api.access.deny('invalid_request', "Access from North America is not allowed."); - } -}; -``` - - - - - - -### Add custom claims to the access token - -A credentials-exchange Action can be used to add custom claims to an access token. - -```javascript lines -/** - * @param {Event} event - Details about client credentials grant request. - * @param {CredentialsExchangeAPI} api - Interface whose methods can be used to change the behavior of client credentials grant. - */ -exports.onExecuteCredentialsExchange = async (event, api) => { - api.accessToken.setCustomClaim("https://my-api.exampleco.com/request-ip", event.request.ip); -}; -``` - - - - - - - - -We strong recommend using namespaced custom claim in the form of a URI. To learn more about namespaced and non-namespaced custom claims, read [Create Custom Claims](/docs/secure/tokens/json-web-tokens/create-custom-claims). - - diff --git a/main/docs/customize/actions/explore-triggers/mfa-notifications-trigger.mdx b/main/docs/customize/actions/explore-triggers/mfa-notifications-trigger.mdx deleted file mode 100644 index 491180f4f5..0000000000 --- a/main/docs/customize/actions/explore-triggers/mfa-notifications-trigger.mdx +++ /dev/null @@ -1,61 +0,0 @@ ---- -description: Learn about Action's Send Phone Message flow and the send-phone-message Action trigger, which runs for the enrollment and challenge process if you have used SMS as a factor for Multi-factor Authentication (MFA). -title: MFA Notifications Triggers ---- -The Send Phone Message trigger allows you to execute code when using SMS/Voice as a factor for [Multi-factor Authentication (MFA)](/docs/secure/multi-factor-authentication). When using a [custom provider](/docs/secure/multi-factor-authentication/multi-factor-authentication-factors/configure-sms-voice-notifications-mfa#custom-phone-messaging-providers) to send the messages, this flow's `send-phone-message` trigger is required to configure your custom provider. - -![Diagram of the Actions Send Phone Message Flow.](/docs/images/cdy7uua7fh8z/FSkVXDdknDJq1hsK08EYu/e031ec0067a5460afae8d9ed5d462288/send-phone-message-flow.png) - -Actions in this flow are blocking (synchronous), which means they execute as part of a trigger's process and will prevent the rest of the Auth0 pipeline from running until the Action is complete. - -## Triggers - -### Send Phone Message - -The `send-phone-message` trigger will run for the enrollment process and the challenge process (`event.message_options.action`). It will also run for the `voice` message type when using the New experience for Universal Login (`event.message_options.message_type === 'voice'`). - -#### References - -* [Event object](/docs/customize/actions/explore-triggers/mfa-notifications-trigger/send-phone-message-event-object): Provides contextual information about the message to be sent and the user to be challenged or enrolled. -* [API object](/docs/customize/actions/explore-triggers/mfa-notifications-trigger/send-phone-message-api-object): Provides methods for changing the behavior of the flow. - -## Common use cases - -### Use a custom SMS provider - -```javascript lines -const AWS = require("aws-sdk"); - -/** - * Handler that will be called during the execution of a SendPhoneMessage flow. - * - * @param {Event} event - Details about the user and the context in which they are logging in. - */ -exports.onExecuteSendPhoneMessage = async (event) => { - const text = event.message_options.text; - const recipient = event.message_options.recipient; - - const awsSNS = new AWS.SNS({ - apiVersion: "2010-03-31", - region: event.secrets.AWS_REGION, - credentials: new AWS.Credentials(event.secrets.AWS_ACCESS_KEY_ID, event.secrets.AWS_SECRET_ACCESS_KEY) - }); - - const params = { Message: text, PhoneNumber: recipient }; - - return awsSNS - .publish(params) - .promise(); -}; -``` - - - - - - - - -For this Action to execute properly, the Action must contain secrets named `AWS_REGION`, `AWS_ACCESS_KEY_ID`, and `AWS_SECRET_ACCESS_KEY`, and must have a dependency on the `aws-sdk` NPM package. - - diff --git a/main/docs/customize/actions/explore-triggers/mfa-notifications-trigger/api-object.mdx b/main/docs/customize/actions/explore-triggers/mfa-notifications-trigger/api-object.mdx deleted file mode 100644 index 8f688d6ca6..0000000000 --- a/main/docs/customize/actions/explore-triggers/mfa-notifications-trigger/api-object.mdx +++ /dev/null @@ -1,62 +0,0 @@ ---- -title: "Actions - Triggers - send-phone-message - API object" ---- -The API object for the send-phone-message Actions trigger includes: - -## `api.cache` - -Store and retrieve data that persists across executions. - -### `api.cache.delete(key)` - -Delete a record describing a cached value at the supplied key if it exists. - -Returns a `CacheWriteResult` object with `type: "success"` if a value was removed from the cache. A failed operation returns `type: "error"`. For errors, the returned object will have a -`code` property that indicates the nature of the failure. - -| Parameter | Description | -| --- | --- | -| `key` | *String*. The key of the record stored in the cache. | - -### `api.cache.get(key)` - -Retrieve a record describing a cached value at the supplied -`key`, if it exists. If a record is found, the cached value can -be found at the `value` property of the returned object. - -Returns a cache record if an item is found in the cache for the supplied -`key`. Cache records are objects with a -`value` property holding the cached value as well as an -`expires_at` property indicating the maximum expiry of -the record in milliseconds since the Unix epoch. - -**Important:** -This cache is designed for short-lived, ephemeral data. Items may not be -available in later transactions even if they are within their supplied their -lifetime. - -| Parameter | Description | -| --- | --- | -| `key` | *String*. The key of the record stored in the cache. | - -### `api.cache.set(key, value, [options])` - -Store or update a string value in the cache at the specified key. - -Values stored in this cache are scoped to the Trigger in which they are set. -They are subject to the -[Actions Cache Limits](/docs/customize/actions/limitations). - -Values stored in this way will have lifetimes of up to the specified -`ttl` or `expires_at` values. If no lifetime is -specified, a default of lifetime of 15 minutes will be used. Lifetimes may -not exceed the maximum duration listed at -[Actions Cache Limits](/docs/customize/actions/limitations). - -| Parameter | Description | -| --- | --- | -| `key` | *String*. The key of the record stored in the cache. | -| `value` | *String*. The value of the record to be stored. | -| `options` | *Optional object*. Options for adjusting cache behavior. | -| `options.expires_at` | *Optional number*. The absolute expiry time in milliseconds since the unix epoch. While cached records may be evicted earlier, they will never remain beyond the the supplied `expires_at`.
*Note:* This value should not be supplied if a value was also provided for `ttl`. If both options are supplied, the earlier expiry of the two will be used. | -| `options.ttl` | *Optional number*. The time-to-live value of this cache entry in milliseconds. While cached values may be evicted earlier, they will never remain beyond the the supplied `ttl`.
*Note:* This value should not be supplied if a value was also provided for `expires_at`. If both options are supplied, the earlier expiry of the two will be used. | \ No newline at end of file diff --git a/main/docs/customize/actions/explore-triggers/password-reset-post-challenge.mdx b/main/docs/customize/actions/explore-triggers/password-reset-post-challenge.mdx new file mode 100644 index 0000000000..c770d20464 --- /dev/null +++ b/main/docs/customize/actions/explore-triggers/password-reset-post-challenge.mdx @@ -0,0 +1,77 @@ +--- +title: "Password Reset Post Challenge" +description: Learn about Password Reset Post Challenge Actions, which run after a user completes the first challenge during the password reset journey but before they set a new password. +--- +The `post-challenge` trigger runs during the password reset process after a user completes the first challenge, typically a link to the [user's email](/docs/secure/multi-factor-authentication/authenticate-using-ropg-flow-with-mfa/enroll-and-challenge-email-authenticators), but before a new password is set. Use this trigger to challenge a user with an additional multi-factor authentication (MFA) factor or to redirect the user to an external site, such as a third-party verifier. After verification, users can provide the new password for their account. You can create up to four Actions in your tenant that leverage the `post-challenge` trigger. + +![To use the Password Reset Flow, navigate to Dashboard > Actions > Flows.](/docs/images/cdy7uua7fh8z/1Pugm9fFYCmdhh7QO5Klzm/7f7eefbf810fd4ebeb22d6393151ffa2/2023-08-14_15-54-03.png) + +Actions in this flow are blocking (synchronous): they execute as part of the trigger's process and prevent the rest of the Auth0 pipeline from running until the Action completes. + + + +In order for these Actions to run properly, you must have Universal Login enabled. These Actions cannot be triggered when using Classic Login. + + + +## References + +* [Event object](/docs/customize/actions/reference/password-reset-post-challenge/password-reset-post-challenge-event-object): Provides contextual information about the user resetting their password. +* [API object](/docs/customize/actions/reference/password-reset-post-challenge/password-reset-post-challenge-api-object): Provides methods for changing the behavior of the flow. + +## Limitations + +Password Reset triggers do not support [Active Directory/LDAP connections](/docs/authenticate/identity-providers/enterprise-identity-providers/active-directory-ldap). + +## Common use cases + +### Secure password reset with additional MFA factors + +A post-challenge Action can issue an MFA challenge after the user completes the first challenge. For example, you can issue a WebAuthn-based challenge as a secondary factor if your tenant has WebAuthn enabled as a factor: + +```javascript lines +/** + * @param {Event} event - Details about the user resetting their password. + * @param {PasswordResetPostChallengeAPI} api - Interface whose methods can be used to change the behavior of the password reset. + */ +exports.onExecutePostChallenge = async (event, api) => { + const enrolledFactors = event.user.enrolledFactors.map((x) => ({ + type: x.type + })); + api.authentication.challengeWith({ type: 'webauthn-roaming' }, { additionalFactors: enrolledFactors }); +}; +``` + +### Redirect users to a third-party application + +In addition to an MFA challenge, you can also try adding a redirect in the custom Action, for example, to a third-party verifier or risk assessor. This sample Action redirects the user to an example app, then continues the Action after the redirect to challenge the user with an MFA factor: + +```javascript lines +/** + * @param {Event} event - Details about the user resetting their password. + * @param {PasswordResetPostChallengeAPI} api - Interface whose methods can be used to change the behavior of the password reset. + */ +exports.onExecutePostChallenge = async (event, api) => { + // Send the user to https://my-app.example.com + api.redirect.sendUserTo('https://my-app.example.com'); +}; + +/** + * @param {Event} event - Details about the user resetting their password. + * @param {PasswordResetPostChallengeAPI} api - Interface whose methods can be used to change the behavior of the password reset. + */ +exports.onContinuePostChallenge = async (event, api) => { + const enrolledFactors = event.user.enrolledFactors.map((x) => ({ + type: x.type + })); + + // Challenge the user with email otp OR another enrolled factor + api.authentication.challengeWith({ type: 'email' }, { additionalFactors: enrolledFactors }); + + // Example of how to challenge the user with multiple options + // in this case email otp OR sms otp + // api.authentication.challengeWithAny([{ type: 'email' }, { type: 'sms' }]); +}; +``` + +The Actions pipeline is not active while Auth0 redirects the user. Once the user continues the Auth0 login process, the Actions pipeline resumes. Actions that were executed prior to the redirect are not executed again. To learn more, read [Redirect with Actions](/docs/customize/actions/redirect-with-actions). \ No newline at end of file diff --git a/main/docs/customize/actions/explore-triggers/password-reset-triggers.mdx b/main/docs/customize/actions/explore-triggers/password-reset-triggers.mdx deleted file mode 100644 index bfbd952aae..0000000000 --- a/main/docs/customize/actions/explore-triggers/password-reset-triggers.mdx +++ /dev/null @@ -1,91 +0,0 @@ ---- -description: Learn about the Actions Password Reset Flow, which is executed after a user completes the first challenge but before the user sets a password. -sidebarTitle: Overview -title: Password Reset Triggers ---- -The Password Reset triggers run during the password reset process when a user completes the first challenge, typically a link to the [user's email](/docs/secure/multi-factor-authentication/authenticate-using-ropg-flow-with-mfa/enroll-and-challenge-email-authenticators), but before a new password is set. You can use this to challenge a user with an additional multi-factor authentication (MFA) factor or to redirect the user to an external site, such as a third-party verifier. - -After verification, users can provide the new password for their account. - -![To use the Password Reset Flow, navigate to Dashboard > Actions > Flows ](/docs/images/cdy7uua7fh8z/1Pugm9fFYCmdhh7QO5Klzm/7f7eefbf810fd4ebeb22d6393151ffa2/2023-08-14_15-54-03.png) - -Actions in this flow are blocking (synchronous), which means they execute as part of a trigger's process and will prevent the rest of the Auth0 pipeline from running until the Action is complete. - - - -In order for these Actions to run properly, you must have Universal Login enabled. These Actions cannot be triggered when using Classic Login. - - - -## Triggers - -### PostChallenge - -The `post-challenge` trigger is a function that executes after a user completes the first password reset challenge, typically an email magic link. You can create up to four Actions in your tenant that leverage the `post-challenge` trigger. - -#### References - -* [Event object](/docs/customize/actions/explore-triggers/password-reset-triggers/post-challenge-trigger/post-challenge-event-object): Provides contextual information about a single user logging in via Auth0. -* [API object](/docs/customize/actions/explore-triggers/password-reset-triggers/post-challenge-trigger/post-challenge-api-object): Provides methods for changing the behavior of the flow. - -## Limitations - -Password Reset triggers do not support [Active Directory/LDAP connections](/docs/authenticate/identity-providers/enterprise-identity-providers/active-directory-ldap). - -## Common use cases - -### Secure password reset with additional MFA factors - -A `password-reset` / `post-challenge` Actions can issue an MFA challenge after the user completes the first challenge. For example, you can issue a WebAuthn-based challenge as a secondary factor if your tenant has WebAuthN enabled as a factor. - -```javascript lines -/**@type {PasswordResetPostChallengeAction}**/ -module.exports.onExecutePostChallenge = async (event, api) => { - const enrolledFactors = event.user.enrolledFactors.map((x) => ({ - type: x.type - })); - api.authentication.challengeWith({ type: 'webauthn-roaming' }, { additionalFactors: enrolledFactors }); -}; -``` - - - - - - -### Redirect users to a third-party application - -In addition to an MFA challenge, you can also try adding a redirect in the custom Action, for example, to a third-party verifier or risk assessor. - -```javascript lines -/** @type {PasswordResetPostChallengeAction} - * This sample action redirects the user to an example app - * and then continues the action after the redirect to challenge - * the user with an MFA factor - */ - -module.exports.onExecutePostChallenge = async (event, api) => { - // Send the user to https://my-app.example.com - api.redirect.sendUserTo('https://my-app.example.com'); -}; - -module.exports.onContinuePostChallenge = async (event, api) => { - const enrolledFactors = event.user.enrolledFactors.map((x) => ({ - type: x.type - })); - - // Challenge the user with email otp OR another enrolled factor - api.authentication.challengeWith({ type: 'email' }, { additionalFactors: enrolledFactors }); - - // Example of how to challenge the user with multiple options - // in this case email otp OR sms otp - // api.authentication.challengeWithAny([{ type: 'email' }, { type: 'sms' }]); -}; -``` - - - - - - -The Actions pipeline is not active while Auth0 redirects the user. Once the user continues the Auth0 login process, the Actions pipeline resumes. Actions that were executed prior to the redirect are not executed again. To learn more, review [Redirect with Actions](/docs/customize/actions/explore-triggers/signup-and-login-triggers/login-trigger/redirect-with-actions). diff --git a/main/docs/customize/actions/explore-triggers/password-reset-triggers/post-challenge-trigger.mdx b/main/docs/customize/actions/explore-triggers/password-reset-triggers/post-challenge-trigger.mdx deleted file mode 100644 index 1e490108a0..0000000000 --- a/main/docs/customize/actions/explore-triggers/password-reset-triggers/post-challenge-trigger.mdx +++ /dev/null @@ -1,8 +0,0 @@ ---- -description: Explore the Auth0 `post-challenge` trigger, which runs after a user completes a password-reset challenge. -title: Post-challenge trigger ---- -See the articles below for more information on Post-challenge triggers. - -* [Actions Triggers: post-challenge - Event Object](/docs/customize/actions/explore-triggers/password-reset-triggers/post-challenge-trigger/post-challenge-event-object) -* [Actions Triggers: post-challenge - API Object](/docs/customize/actions/explore-triggers/password-reset-triggers/post-challenge-trigger/post-challenge-api-object) diff --git a/main/docs/customize/actions/explore-triggers/password-reset-triggers/post-change-password-trigger/api-object.mdx b/main/docs/customize/actions/explore-triggers/password-reset-triggers/post-change-password-trigger/api-object.mdx deleted file mode 100644 index e16c2d906c..0000000000 --- a/main/docs/customize/actions/explore-triggers/password-reset-triggers/post-change-password-trigger/api-object.mdx +++ /dev/null @@ -1,63 +0,0 @@ ---- -description: Learn about the post-change-password Action trigger's API object. -title: Actions - Triggers - post-change-password - API object ---- -The API object for the post-change-password Actions trigger includes: - -## `api.cache` - -Store and retrieve data that persists across executions. - -### `api.cache.delete(key)` - -Delete a record describing a cached value at the supplied key, if it exists. - -Returns a `CacheWriteResult` object with `type: "success"` if a value was removed from the cache. A failed operation returns `type: "error"`. For errors, the returned object will have a -`code` property indicating the nature of the failure. - -| Parameter | Description | -| --- | --- | -| `key` | *String*. The key of the record stored in the cache. | - -### `api.cache.get(key)` - -Retrieve a record describing a cached value at the supplied -`key`, if it exists. If a record is found, the cached value can -be found at the `value` property of the returned object. - -Returns a cache record if an item is found in the cache for the supplied -`key`. Cache records are objects with a -`value` property holding the cached value as well as an -`expires_at` property indicating the maximum expiry of -the record in milliseconds since the Unix epoch. - -**Important:** -This cache is designed for short-lived, ephemeral data. Items may not be -available in later transactions even if they are within their supplied their -lifetime. - -| Parameter | Description | -| --- | --- | -| `key` | *String*. The key of the record stored in the cache. | - -### `api.cache.set(key, value, [options])` - -Store or update a string value in the cache at the specified key. - -Values stored in this cache scope to the Trigger in which they are set. -They are subject to the -[Actions Cache Limits](/docs/customize/actions/limitations). - -Values stored this way have lifetimes of up to the specified -`ttl` or `expires_at` values. If no lifetime is -specified, a default lifetime of 15 minutes will be used. Lifetimes may -not exceed the maximum duration listed at -[Actions Cache Limits](/docs/customize/actions/limitations). - -| Parameter | Description | -| --- | --- | -| `key` | *String*. The key of the record stored in the cache. | -| `value` | *String*. The value of the record to be stored. | -| `options` | *Optional object*. Options for adjusting cache behavior. | -| `options.expires_at` | *Optional number*. The absolute expiry time in milliseconds since the unix epoch. While cached records may be evicted earlier, they will never remain beyond the the supplied `expires_at`.
*Note:* This value should not be supplied if a value was also provided for `ttl`. If both options are supplied, the earlier expiry of the two will be used. | -| `options.ttl` | *Optional number*. The time-to-live value of this cache entry in milliseconds. While cached values may be evicted earlier, they will never remain beyond the the supplied `ttl`.
*Note:* This value should not be supplied if a value was also provided for `expires_at`. If both options are supplied, the earlier expiry of the two will be used. | diff --git a/main/docs/customize/actions/explore-triggers/password-reset-triggers/post-change-password-trigger.mdx b/main/docs/customize/actions/explore-triggers/post-change-password.mdx similarity index 52% rename from main/docs/customize/actions/explore-triggers/password-reset-triggers/post-change-password-trigger.mdx rename to main/docs/customize/actions/explore-triggers/post-change-password.mdx index f1036ebdda..04bfd44cfb 100644 --- a/main/docs/customize/actions/explore-triggers/password-reset-triggers/post-change-password-trigger.mdx +++ b/main/docs/customize/actions/explore-triggers/post-change-password.mdx @@ -1,30 +1,21 @@ --- -description: Learn about the Post Change Password flow and the post-change-password Action trigger, which runs after a Database connection user resets or changes their password. This trigger can be used to notify another system that the user’s password has changed. -sidebarTitle: Overview -title: Post Change Password Trigger +title: "Post Change Password" +description: Learn about Post Change Password Actions, which run after a Database connection user resets or changes their password. They can be used to notify another system that the user's password has changed. --- -The Post Change Password trigger runs after a user resets or changes their password. You can use this trigger to email the user after a password change or to notify another system that the user’s password has changed, so that other sessions not managed by Auth0 can be revoked. +The `post-change-password` trigger runs after a Database connection user resets or changes their password. Use this trigger to email the user after a password change or to notify another system that the user's password has changed, so that other sessions not managed by Auth0 can be revoked. Multiple Actions can be bound to this trigger, and the Actions will run in order. ![Diagram showing the Actions Post Change Password Flow.](/docs/images/cdy7uua7fh8z/3i65TvmTpHkyDTqKvXAkMi/3adb8f0bd195cec4dd0a82cb87b270b9/post-change-password-flow.png) -Actions in this flow are non-blocking (asynchronous), which means the Auth0 pipeline will continue to run without waiting for the Action to finish its execution. Thus, the Action's outcome does not affect the Auth0 transaction. +Actions in this flow are non-blocking (asynchronous): the Auth0 pipeline continues to run without waiting for the Action to finish, so the Action's outcome does not affect the Auth0 transaction. -## Triggers +## References -### Post Change Password - -The `post-change-password` trigger runs after a database connection user resets or changes their password. - -Multiple Actions can be bound to this trigger, and the Actions will run in order. However, these Actions will be run asynchronously and will not block the password reset process. - -### Reference - -* [Event object](/docs/customize/actions/explore-triggers/password-reset-triggers/post-change-password-trigger/post-change-password-event-object): Provides contextual information about the user and the connection on which the password was changed. -* [API object](/docs/customize/actions/explore-triggers/password-reset-triggers/post-change-password-trigger/post-change-password-api-object): Provides methods for changing the behavior of the flow. +* [Event object](/docs/customize/actions/reference/post-change-password/post-change-password-event-object): Provides contextual information about the user and the connection on which the password was changed. +* [API object](/docs/customize/actions/reference/post-change-password/post-change-password-api-object): Provides methods for changing the behavior of the flow. ## Common use cases -### Invalidate the user’s session in another system +### Invalidate the user's session in another system A post-change-password Action can be used to invalidate the user's session in another system: @@ -39,11 +30,6 @@ exports.onExecutePostChangePassword = async (event) => { }; ``` - - - - - To use an `npm` library like `axios`, you must add the library to the Action as a dependency. To learn more, read the "Add a dependency" section in [Write Your First Action](/docs/customize/actions/write-your-first-action). @@ -52,9 +38,14 @@ To use an `npm` library like `axios`, you must add the library to the Action as ### Send an email after the user changes their password +A post-change-password Action can be used to notify the user by email that their password was changed: + ```javascript lines expandable const axios = require("axios"); +/** + * @param {Event} event - Details about user whose password was changed. + */ exports.onExecutePostChangePassword = async (event) => { try { // https://sendgrid.api-docs.io/v3.0/mail-send @@ -82,5 +73,8 @@ exports.onExecutePostChangePassword = async (event) => { }; ``` + +For this Action to execute properly, the Action must contain a secret named `SENDGRID_API_KEY` and must have a dependency on the `axios` `npm` package. + \ No newline at end of file diff --git a/main/docs/customize/actions/explore-triggers/signup-and-login-triggers/login-trigger.mdx b/main/docs/customize/actions/explore-triggers/post-login.mdx similarity index 68% rename from main/docs/customize/actions/explore-triggers/signup-and-login-triggers/login-trigger.mdx rename to main/docs/customize/actions/explore-triggers/post-login.mdx index ccdb34327e..453c797cb5 100644 --- a/main/docs/customize/actions/explore-triggers/signup-and-login-triggers/login-trigger.mdx +++ b/main/docs/customize/actions/explore-triggers/post-login.mdx @@ -1,24 +1,17 @@ --- -description: Learn about the Actions Login Flow and the post-login Action trigger, which is executed after a user logs in and when a Refresh Token is requested. -sidebarTitle: Overview -title: Login Trigger +title: "Post Login" +description: Learn about Post Login Actions, which run after a user logs in and when a Refresh Token is requested. They can be used to control access, enrich tokens and user profiles, and enforce custom MFA policies. --- -The Login trigger executes when a user successfully authenticates against an application on an Auth0 tenant. This also includes post-signup authentication. +The `post-login` trigger runs when a user successfully authenticates against an application on an Auth0 tenant, including authentication after signup, and when a Refresh Token is exchanged. ![Diagram showing the Actions Login Flow.](/docs/images/cdy7uua7fh8z/2SkfIOm4fFOJ8N0GNJwam8/77230cdb4411b2383751b037fb56fe29/2024-09-30_10-01-42.png) -Actions in this trigger are blocking (synchronous), which means they execute as part of a trigger's process and prevent the rest of the Auth0 pipeline from running until the Action is complete. +Actions in this flow are blocking (synchronous): they execute as part of the trigger's process and prevent the rest of the Auth0 pipeline from running until the Action completes. -## Triggers +## References -### Login / Post Login - -The `post-login` trigger is a function executed after a user logs in and when a Refresh Token is exchanged. - -#### References - -* [Event object](/docs/customize/actions/explore-triggers/signup-and-login-triggers/login-trigger/post-login-event-object): Provides contextual information about a single user logging in via Auth0. -* [API object](/docs/customize/actions/explore-triggers/signup-and-login-triggers/login-trigger/post-login-api-object): Provides methods for changing the behavior of the flow. +* [Event object](/docs/customize/actions/reference/post-login/post-login-event-object): Provides contextual information about a single user logging in via Auth0. +* [API object](/docs/customize/actions/reference/post-login/post-login-api-object): Provides methods for changing the behavior of the flow. ## Common use cases @@ -38,21 +31,16 @@ exports.onExecutePostLogin = async (event, api) => { }; ``` - - - - - ### Allow access only on weekdays for a specific application -If you have an application that you want to make sure is only accessible during weekdays, you can create the following Action: +If you have an application that you want to make sure is only accessible during weekdays, you can create the following Action: ```javascript lines /** * @param {Event} event - Details about the user and the context in which they are logging in. * @param {PostLoginAPI} api - Interface whose methods can be used to change the behavior of the login. */ - exports.onExecutePostLogin = async (event, api) => { +exports.onExecutePostLogin = async (event, api) => { if (event.client.name === "APP_NAME") { const d = new Date().getDay(); @@ -60,39 +48,29 @@ If you have an application that you want to make sure is only accessible during api.access.deny("This app is only available during the week."); } } -} +}; ``` - - - - - ### Deny access to anyone calling an API -Let's say you want to deny access to all users who are calling an API. This means that you need to deny access depending on the audience value for your API, which you can find in the **API Audience** field of your API in [Dashboard > Applications > APIs](https://manage.auth0.com/#/apis). To do this, you would create the following Action: +Let's say you want to deny access to all users who are calling an API. This means that you need to deny access depending on the audience value for your API, which you can find in the **API Audience** field of your API in [Dashboard > Applications > APIs](https://manage.auth0.com/#/apis). To do this, you would create the following Action: ```javascript lines /** * @param {Event} event - Details about the user and the context in which they are logging in. * @param {PostLoginAPI} api - Interface whose methods can be used to change the behavior of the login. */ - exports.onExecutePostLogin = async (event, api) => { +exports.onExecutePostLogin = async (event, api) => { // In Actions, an API will be referred to as a Resource Server. if (event.resource_server && event.resource_server.identifier === "http://todoapi2.api") { api.access.deny("end_users_not_allowed"); } -} +}; ``` - - - - - ### Add user roles to ID and Access tokens -To add user roles to Auth0-issued tokens, use the `event.authorization` object along with the `api.idToken.setCustomClaim` and `api.accessToken.setCustomClaim` methods: +To add user roles to Auth0-issued tokens, use the `event.authorization` object along with the `api.idToken.setCustomClaim` and `api.accessToken.setCustomClaim` methods: ```javascript lines /** @@ -105,20 +83,19 @@ exports.onExecutePostLogin = async (event, api) => { api.idToken.setCustomClaim(`${namespace}/roles`, event.authorization.roles); api.accessToken.setCustomClaim(`${namespace}/roles`, event.authorization.roles); } -} +}; ``` + - - - - -* A custom claim cannot include certain terms, and we strongly recommend using namespaced claim that takes the form of a URI. See [our documentation on custom claims](/docs/secure/tokens/json-web-tokens/create-custom-claims) for more information. +* A custom claim cannot include certain terms, and we strongly recommend using a namespaced claim that takes the form of a URI. To learn more, read [Create Custom Claims](/docs/secure/tokens/json-web-tokens/create-custom-claims). * The JWT returned to the requesting application is built and signed at the end of the trigger processing. The final, signed JWT is not accessible in an Action. + + ### Enrich the user profile -Auth0 provides a system for storing metadata on a [User Profile](/docs/manage-users/user-accounts/user-profiles/normalized-user-profiles). In order to set `user_metadata` or `app_metadata` on a user’s profile during their login, use the `api.user.setUserMetadata` or `api.user.setAppMetadata` functions. +Auth0 provides a system for storing metadata on a [User Profile](/docs/manage-users/user-accounts/user-profiles/normalized-user-profiles). In order to set `user_metadata` or `app_metadata` on a user's profile during their login, use the `api.user.setUserMetadata` or `api.user.setAppMetadata` functions: ```javascript lines /** @@ -130,16 +107,11 @@ exports.onExecutePostLogin = async (event, api) => { }; ``` - - - - - -Once all post-login actions have been executed, Actions will update the user profile in a single operation. This operation is subject to the "Write Users" [rate limit](/docs/troubleshoot/customer-support/operational-policies/rate-limit-policy/management-api-endpoint-rate-limits). +Once all post-login Actions have been executed, Actions will update the user profile in a single operation. This operation is subject to the "Write Users" [rate limit](/docs/troubleshoot/customer-support/operational-policies/rate-limit-policy/management-api-endpoint-rate-limits). ### Enforce custom MFA policy -A post-login Action can be used to dynamically require MFA for a user according to your application’s needs. +A post-login Action can be used to dynamically require MFA for a user according to your application's needs: ```javascript lines /** @@ -154,47 +126,35 @@ exports.onExecutePostLogin = async (event, api) => { }; ``` - - - - - -An MFA Provider must be configured in order to enable MFA during a login. To learn more, read [Multi-Factor Authentication](/docs/secure/multi-factor-authentication). +An MFA provider must be configured in order to enable MFA during a login. To learn more, read [Multi-Factor Authentication](/docs/secure/multi-factor-authentication). ### Reduce friction with passkeys -A post-login Action can be used to reduce the friction by dynamically skipping MFA for a user that has authenticated with a passkey. +A post-login Action can be used to reduce friction by dynamically skipping MFA for a user that has authenticated with a passkey: ```javascript lines /** -* Handler that will be called during the execution of a PostLogin flow. -* -* @param {Event} event - Details about the user and the context in which they are logging in. -* @param {PostLoginAPI} api - Interface whose methods can be used to change the behavior of the login. -*/ + * @param {Event} event - Details about the user and the context in which they are logging in. + * @param {PostLoginAPI} api - Interface whose methods can be used to change the behavior of the login. + */ exports.onExecutePostLogin = async (event, api) => { - // Check if a passkey was used to authenticate - const skipMFA = event.authentication?.methods.some( - (method) => method.name === "passkey" - ); - - // If a passkey was used skip MFA - if (skipMFA) { - api.multifactor.enable("none"); - } + // Check if a passkey was used to authenticate + const skipMFA = event.authentication?.methods.some( + (method) => method.name === "passkey" + ); + + // If a passkey was used skip MFA + if (skipMFA) { + api.multifactor.enable("none"); + } }; ``` - - - - - The connection must have passkeys and MFA enabled. To learn more, read [Passkeys](/docs/authenticate/database-connections/passkeys) and [Multi-Factor Authentication](/docs/secure/multi-factor-authentication). ### Redirect the user to an external site -Similar to [Redirect Rules](/docs/customize/rules/redirect-users), a post-login Action can be used to send the user to an external site. When completed, the user can be redirected back to Auth0 to continue their login flow. In the example below, a Redirect Action is used to prompt the user to provide their favorite color. +Similar to [Redirect Rules](/docs/customize/rules/redirect-users), a post-login Action can be used to send the user to an external site. When completed, the user can be redirected back to Auth0 to continue their login flow. In the example below, a Redirect Action is used to prompt the user to provide their favorite color: ```javascript lines expandable /** @@ -237,18 +197,13 @@ exports.onContinuePostLogin = async (event, api) => { }; ``` +The Actions pipeline will be suspended while the user is redirected. Once the user continues their Auth0 login process, the Actions pipeline will resume where it was suspended. Actions that were executed prior to the redirect will not be executed again. - - - - -The Actions pipeline will be suspended while the user is redirected. Once the user continues their Auth0 login process, the Actions pipeline will resume where it was suspended. Actions that were executed prior to the Redirect will not be executed again. - -To learn more about Redirect Actions, read [Redirect with Actions](/docs/customize/actions/explore-triggers/signup-and-login-triggers/login-trigger/redirect-with-actions). +To learn more about Redirect Actions, read [Redirect with Actions](/docs/customize/actions/redirect-with-actions). ### Modify scopes on an access token -When modifying the scopes associated with an access token, ensure you adhere to the best practices surrounding audience specification. +When modifying the scopes associated with an access token, ensure you adhere to the best practices surrounding audience specification: * Always check for expected audience before adding scopes. * Prevent using untrusted input when adding scopes. @@ -265,17 +220,16 @@ exports.onExecutePostLogin = async (event, api) => { }; ``` - - - - - ### Deny access to specific JA3/JA4 fingerprints -The `event.security_context` object contains the JA3/JA4 fingerprint values for the current transaction. +The `event.security_context` object contains the JA3/JA4 fingerprint values for the current transaction: -```js lines -exports.onExecutePreUserRegistration = async (event, api) => { +```javascript lines +/** + * @param {Event} event - Details about the user and the context in which they are logging in. + * @param {PostLoginAPI} api - Interface whose methods can be used to change the behavior of the login. + */ +exports.onExecutePostLogin = async (event, api) => { const clientJa4 = event?.security_context?.ja4; console.log('[ACTION]', {clientJa4}); const badFingerprints = ['t13d1517h2_8daaf6152771_b6f405a00624','t13d1516h2_8daaf6152771_d8a2da3f94cd']; @@ -285,13 +239,8 @@ exports.onExecutePreUserRegistration = async (event, api) => { }; ``` - - - - - ## Learn more * [Manage User Metadata with the post-login Action Trigger](/docs/manage-users/user-accounts/metadata/manage-user-metadata) -* [Redirect with Actions](/docs/customize/actions/explore-triggers/signup-and-login-triggers/login-trigger/redirect-with-actions) -* [Understand How Metadata Works in User Profiles](/docs/manage-users/user-accounts/metadata) +* [Redirect with Actions](/docs/customize/actions/redirect-with-actions) +* [Understand How Metadata Works in User Profiles](/docs/manage-users/user-accounts/metadata) \ No newline at end of file diff --git a/main/docs/customize/actions/explore-triggers/post-user-registration.mdx b/main/docs/customize/actions/explore-triggers/post-user-registration.mdx new file mode 100644 index 0000000000..7f20770f98 --- /dev/null +++ b/main/docs/customize/actions/explore-triggers/post-user-registration.mdx @@ -0,0 +1,64 @@ +--- +title: "Post User Registration" +description: Learn about Post User Registration Actions, which run after a user has been created for a Database or Passwordless connection. They can be used to notify another system that a user has registered. +--- +The `post-user-registration` trigger runs after a user is added to a Database or Passwordless connection. Use this trigger to notify another system that a user has registered for your application. Multiple Actions can be bound to this trigger, and the Actions will run in order. + +![Diagram of the Actions Post User Registration Flow.](/docs/images/cdy7uua7fh8z/4bqF9YEPYQshnJGCx39pws/079798c354f4a83355a756a6a02650d5/post-user-registration-flow.png) + +Actions in this flow are non-blocking (asynchronous): the Auth0 pipeline continues to run without waiting for the Action to finish, so the Action's outcome does not affect the Auth0 transaction. + +## References + +* [Event object](/docs/customize/actions/reference/post-user-registration/post-user-registration-event-object): Provides contextual information about the newly-created user. +* [API object](/docs/customize/actions/reference/post-user-registration/post-user-registration-api-object): Provides methods for changing the behavior of the flow. + +## Common use cases + +### Notify Slack when a new user registers + +A post-user-registration Action can be used to notify a Slack channel about each new registration: + +```javascript lines +/** + * @param {Event} event - Details about the context and user that has registered. + * @param {PostUserRegistrationAPI} api - Interface whose methods can be used to change the behavior of post user registration. + */ +exports.onExecutePostUserRegistration = async (event, api) => { + const { IncomingWebhook } = require("@slack/webhook"); + const webhook = new IncomingWebhook(event.secrets.SLACK_WEBHOOK_URL); + + const text = `New User: ${event.user.email}`; + const channel = '#some_channel'; + + webhook.send({ text, channel }); +}; +``` + + + +For this Action to execute properly, the Action must contain a secret named `SLACK_WEBHOOK_URL` and must have a dependency on the `@slack/webhook` `npm` package. + + + +### Store the Auth0 user ID in a remote system + +A post-user-registration Action can be used to store the Auth0 user ID in a remote system: + +```javascript lines +const axios = require("axios"); + +/** + * @param {Event} event - Details about the context and user that has registered. + * @param {PostUserRegistrationAPI} api - Interface whose methods can be used to change the behavior of post user registration. + */ +exports.onExecutePostUserRegistration = async (event, api) => { + await axios.post("https://my-api.exampleco.com/users", { params: { email: event.user.email }}); +}; +``` + + + +To use an `npm` library like `axios`, you must add the library to the Action as a dependency. To learn more, read the "Add a dependency" section in [Write Your First Action](/docs/customize/actions/write-your-first-action). + + \ No newline at end of file diff --git a/main/docs/customize/actions/explore-triggers/pre-user-registration.mdx b/main/docs/customize/actions/explore-triggers/pre-user-registration.mdx new file mode 100644 index 0000000000..e562c7597a --- /dev/null +++ b/main/docs/customize/actions/explore-triggers/pre-user-registration.mdx @@ -0,0 +1,117 @@ +--- +title: "Pre User Registration" +description: Learn about Pre User Registration Actions, which run before a user is added to a Database or Passwordless connection. They can be used to add metadata to the user profile before it is created or to deny a registration. +--- +The `pre-user-registration` trigger runs when a user attempts to register through a Database or Passwordless connection, before the user is created. Use this trigger to add metadata to the user profile before it is created or to deny a registration with custom logic. + +![Diagram showing the Actions Pre User Registration Flow.](/docs/images/cdy7uua7fh8z/2KtUcZhaBcT12GxjhBJZFG/9633b4454ac1c06c0deed6c97e70fe7d/pre-user-registration-flow.png) + +Actions in this flow are blocking (synchronous): they execute as part of the trigger's process and prevent the rest of the Auth0 pipeline from running until the Action completes. + + + +You cannot currently use `pre-user-registration` Actions to add metadata to passwordless users. + + + +## References + +* [Event object](/docs/customize/actions/reference/pre-user-registration/pre-user-registration-event-object): Provides contextual information about the request to register a new user. +* [API object](/docs/customize/actions/reference/pre-user-registration/pre-user-registration-api-object): Provides methods for changing the behavior of the flow. + +## Common use cases + +### Deny registration by location + +A pre-user-registration Action can be used to prevent a user from signing up: + +```javascript lines +/** + * @param {Event} event - Details about the context and user that is attempting to register. + * @param {PreUserRegistrationAPI} api - Interface whose methods can be used to change the behavior of the signup. + */ +exports.onExecutePreUserRegistration = async (event, api) => { + if (event.request.geoip.continentCode === "NA") { + + // localize the error message + const LOCALIZED_MESSAGES = { + en: 'You are not allowed to register.', + es: 'No tienes permitido registrarte.' + }; + + const userMessage = LOCALIZED_MESSAGES[event.request.language] || LOCALIZED_MESSAGES['en']; + api.access.deny('no_signups_from_north_america', userMessage); + } +}; +``` + +### Set metadata in the user profile + +A pre-user-registration Action can be used to add metadata to the user profile before it is created: + +```javascript lines +/** + * @param {Event} event - Details about the context and user that is attempting to register. + * @param {PreUserRegistrationAPI} api - Interface whose methods can be used to change the behavior of the signup. + */ +exports.onExecutePreUserRegistration = async (event, api) => { + api.user.setUserMetadata("screen_name", "username"); +}; +``` + +### Store a user ID from another system in the user profile + +A pre-user-registration Action can be used to store a user ID from another system in the user profile: + +```javascript lines expandable +const axios = require('axios'); + +const REQUEST_TIMEOUT = 2000; // Example timeout + +/** + * @param {Event} event - Details about the context and user that is attempting to register. + * @param {PreUserRegistrationAPI} api - Interface whose methods can be used to change the behavior of the signup. + */ +exports.onExecutePreUserRegistration = async (event, api) => { + try { + // Set a secret USER_SERVICE_URL = 'https://yourservice.com' + const remoteUser = await axios.get(event.secrets.USER_SERVICE_URL, { + timeout: REQUEST_TIMEOUT, + params: { + email: event.user.email + } + }); + + if (remoteUser) { + api.user.setAppMetadata('my-api-user-id', remoteUser.id); + } + } catch (err) { + api.validation.error('custom_error', 'Custom Error'); + } +}; +``` + + + +To use an `npm` library like `axios`, you must add the library to the Action as a dependency. To learn more, read the "Add a dependency" section in [Write Your First Action](/docs/customize/actions/write-your-first-action). + + + +### Deny access to specific JA3/JA4 fingerprints + +The `event.security_context` object contains the JA3/JA4 fingerprint values for the current transaction: + +```javascript lines +/** + * @param {Event} event - Details about the context and user that is attempting to register. + * @param {PreUserRegistrationAPI} api - Interface whose methods can be used to change the behavior of the signup. + */ +exports.onExecutePreUserRegistration = async (event, api) => { + const clientJa4 = event?.security_context?.ja4; + console.log('[ACTION]', {clientJa4}); + const badFingerprints = ['t13d1517h2_8daaf6152771_b6f405a00624','t13d1516h2_8daaf6152771_d8a2da3f94cd']; + if (clientJa4 && badFingerprints.includes(clientJa4)){ + api.access.deny('suspicious_tls_fingerprint', 'Your TLS fingerprint has been flagged as suspicious'); + } +}; +``` \ No newline at end of file diff --git a/main/docs/customize/actions/explore-triggers/send-phone-message.mdx b/main/docs/customize/actions/explore-triggers/send-phone-message.mdx new file mode 100644 index 0000000000..09b32589a4 --- /dev/null +++ b/main/docs/customize/actions/explore-triggers/send-phone-message.mdx @@ -0,0 +1,50 @@ +--- +title: "Send Phone Message" +description: Learn about Send Phone Message Actions, which run during the enrollment and challenge process when SMS or Voice is used as a factor for Multi-factor Authentication (MFA). +--- +The `send-phone-message` trigger runs when using SMS/Voice as a factor for [Multi-factor Authentication (MFA)](/docs/secure/multi-factor-authentication). It runs for both the enrollment process and the challenge process (`event.message_options.action`), and for the `voice` message type when using the New experience for Universal Login (`event.message_options.message_type === 'voice'`). When using a [custom provider](/docs/secure/multi-factor-authentication/multi-factor-authentication-factors/configure-sms-voice-notifications-mfa#custom-phone-messaging-providers) to send the messages, this trigger is required to configure your custom provider. + +![Diagram of the Actions Send Phone Message Flow.](/docs/images/cdy7uua7fh8z/FSkVXDdknDJq1hsK08EYu/e031ec0067a5460afae8d9ed5d462288/send-phone-message-flow.png) + +Actions in this flow are blocking (synchronous): they execute as part of the trigger's process and prevent the rest of the Auth0 pipeline from running until the Action completes. + +## References + +* [Event object](/docs/customize/actions/reference/send-phone-message/send-phone-message-event-object): Provides contextual information about the message to be sent and the user to be challenged or enrolled. +* [API object](/docs/customize/actions/reference/send-phone-message/send-phone-message-api-object): Provides methods for changing the behavior of the flow. + +## Common use cases + +### Use a custom SMS provider + +A send-phone-message Action can be used to deliver MFA messages through a custom SMS provider: + +```javascript lines +const AWS = require("aws-sdk"); + +/** + * @param {Event} event - Details about the user and the context in which they are logging in. + */ +exports.onExecuteSendPhoneMessage = async (event) => { + const text = event.message_options.text; + const recipient = event.message_options.recipient; + + const awsSNS = new AWS.SNS({ + apiVersion: "2010-03-31", + region: event.secrets.AWS_REGION, + credentials: new AWS.Credentials(event.secrets.AWS_ACCESS_KEY_ID, event.secrets.AWS_SECRET_ACCESS_KEY) + }); + + const params = { Message: text, PhoneNumber: recipient }; + + return awsSNS + .publish(params) + .promise(); +}; +``` + + + +For this Action to execute properly, the Action must contain secrets named `AWS_REGION`, `AWS_ACCESS_KEY_ID`, and `AWS_SECRET_ACCESS_KEY`, and must have a dependency on the `aws-sdk` `npm` package. + + \ No newline at end of file diff --git a/main/docs/customize/actions/explore-triggers/signup-and-login-triggers.mdx b/main/docs/customize/actions/explore-triggers/signup-and-login-triggers.mdx deleted file mode 100644 index 6134b7d087..0000000000 --- a/main/docs/customize/actions/explore-triggers/signup-and-login-triggers.mdx +++ /dev/null @@ -1,12 +0,0 @@ ---- -description: Compare the Auth0 signup and login Actions triggers, to choose which trigger runs your custom logic before, during, or after a user authenticates or is added to a connection. -sidebarTitle: Overview -title: Signup and Login Triggers ---- -For more information on Signup and Login triggers, see the sections below. - -| Trigger | Description | -| --- | --- | -| [Login Trigger](/docs/customize/actions/explore-triggers/signup-and-login-triggers/login-trigger) | The Login triggers run when a user logs in to any application in an Auth0 tenant. | -| [Pre-user Registration Trigger](/docs/customize/actions/explore-triggers/signup-and-login-triggers/pre-user-registration-trigger) | The Pre-user Registration trigger runs before a user is added to a Database or Passwordless Connection. | -| [Post-user Registration Trigger](/docs/customize/actions/explore-triggers/signup-and-login-triggers/post-user-registration-trigger) | The Post-user Registration trigger runs after a user is added to a Database or Passwordless Connection. | diff --git a/main/docs/customize/actions/explore-triggers/signup-and-login-triggers/custom-token-exchange-trigger.mdx b/main/docs/customize/actions/explore-triggers/signup-and-login-triggers/custom-token-exchange-trigger.mdx deleted file mode 100644 index 9ea3fe9f77..0000000000 --- a/main/docs/customize/actions/explore-triggers/signup-and-login-triggers/custom-token-exchange-trigger.mdx +++ /dev/null @@ -1,54 +0,0 @@ ---- -description: Learn about the Custom Token Exchange Trigger, which is executed when the Auth0 Authorization Server receives a Custom Token Exchange Request to log a user in. -sidebarTitle: Overview -title: Custom Token Exchange Trigger ---- - - - -Custom Token Exchange (CTE) is currently available in Early Access for all Auth0 B2C Professional, B2B Professional, and Enterprise customers. By using this feature, you agree to the applicable Free Trial terms in [Okta’s Master Subscription Agreement](https://www.okta.com/legal/). To learn more about Auth0’s product release cycle, read [Product Release Stages](/docs/troubleshoot/product-lifecycle/product-release-stages). To learn more about subscription types, review the Auth0 [pricing](https://auth0.com/pricing) page. - - - -After the Auth0 Authorization Server validates that the Custom Token Exchange request is valid and maps to an existing [Custom Token Exchange Profile](/docs/authenticate/custom-token-exchange/configure-custom-token-exchange#create-custom-token-exchange-profile), the `custom-token-exchange` trigger executes the single Action associated with that profile. If the Action successfully completes and sets a user for the transaction, `post-login` Actions and the rest of the Auth0 pipeline are then executed for that logged-in user. - -![](/docs/images/custom-token-exchange/cte_trigger_flow.png) - -Actions in this flow are blocking (synchronous), which means they execute as part of a trigger’s process and will prevent the rest of the Auth0 pipeline from running until the Action is complete. - -## Custom Token Exchange vs Post Login Actions - -The Post Login Actions trigger executes after the Custom Token Exchange Action runs for the user you set for the transaction. For other use cases, such as adding custom claims to access tokens, use the [Post Login Action trigger](/docs/customize/actions/explore-triggers/signup-and-login-triggers/login-trigger). - -The Custom Token Exchange uses the token exchange grant type, where the `event.transaction.protocol` is set to `oauth2-token-exchange` in the Post Login Action trigger. Both the Custom Token Exchange and Native Social Login use the token exchange grant type. To distinguish between the two, use the value of the `subject_token_type`, which should correspond to one of your Custom Token Exchange Profiles. - - -Custom Token Exchange Early Access doesn’t support `api.authentication.challengeWith()` or `api.authentication.enrollWith()`. If you use those methods with your Post-Login Actions, the transaction will fail with a non-recoverable error. Make sure you skip those two methods when `event.transaction.protocol==oauth2-token-exchange` depending on the `subject_token_type` value. - - - -## Actor support for delegation - -The `custom-token-exchange` trigger supports delegated authorization scenarios. The Action can call [`api.authentication.setActor()`](/docs/customize/actions/explore-triggers/signup-and-login-triggers/custom-token-exchange-trigger/custom-token-exchange-api-object#api-authentication-setactor-actor) to include an `act` claim in issued tokens, identifying the principal acting on behalf of the subject user. - -`setActor()` can be called regardless of whether the request includes an `actor_token`. The `actor_token` parameter is one way for the calling application to pass actor information to the Action, but the actor identity can also be embedded in the `subject_token` itself or obtained through other custom means within the Action code. - -When the request does include `actor_token` and `actor_token_type`, these values are available in [`event.transaction`](/docs/customize/actions/explore-triggers/signup-and-login-triggers/custom-token-exchange-trigger/custom-token-exchange-event-object#event-transaction). If `actor_token_type` is `urn:ietf:params:oauth:token-type:id_token` and the token is a valid Auth0 ID token from the same tenant, the server automatically validates the token and populates `event.transaction.actor_token_user` with the actor’s user profile. - -The `act` claim set via `setActor()` is also available in Post-Login Actions via [`event.transaction.actor`](/docs/customize/actions/explore-triggers/signup-and-login-triggers/login-trigger/post-login-event-object#event-transaction). - -## Triggers - -### Custom Token Exchange - -The `custom-token-exchange` trigger is the first step in the Auth0 pipeline. This function is executed after the received Custom Token Exchange request has been validated and successfully mapped to an existing profile. - -### References - -* [Event object](/docs/customize/actions/explore-triggers/signup-and-login-triggers/custom-token-exchange-trigger/custom-token-exchange-event-object): Provides contextual information about the a Token Exchange request, including the subject_token, IP address, client, and more. -* [API object](/docs/customize/actions/explore-triggers/signup-and-login-triggers/custom-token-exchange-trigger/custom-token-exchange-api-object): Provides methods to use with your Token Exchange Action that allows you to set the user, set the actor for delegation, reject the transaction, set user metadata and access the Actions cache, and more. - -## Common Use Cases - -To learn about common Custom Token Exchange use cases, read [Example Use Cases](/docs/authenticate/custom-token-exchange/cte-example-use-cases). - diff --git a/main/docs/customize/actions/explore-triggers/signup-and-login-triggers/post-user-registration-trigger.mdx b/main/docs/customize/actions/explore-triggers/signup-and-login-triggers/post-user-registration-trigger.mdx deleted file mode 100644 index 6e55d772fb..0000000000 --- a/main/docs/customize/actions/explore-triggers/signup-and-login-triggers/post-user-registration-trigger.mdx +++ /dev/null @@ -1,103 +0,0 @@ ---- -description: Learn about the Post User Registration Flow and post-user-registration Action trigger, which runs after a user has been created for a Database or Passwordless connection. -sidebarTitle: Overview -title: Post-user Registration Trigger ---- -The Post-user Registration trigger runs after a user is added to a Database or Passwordless Connection. - -![Diagram of the Actions Post User Registration Flow.](/docs/images/cdy7uua7fh8z/4bqF9YEPYQshnJGCx39pws/079798c354f4a83355a756a6a02650d5/post-user-registration-flow.png) - -Actions in this flow are non-blocking (asynchronous), which means the Auth0 pipeline will continue to run without waiting for the Action to finish its execution. Thus, the Action's outcome does not affect the Auth0 transaction. - -## Triggers - -### Post User Registration - -The `post-user-registration` triggers runs after a user has been created for a Database or Passwordless connection. This trigger can be used to notify another system that a user has registered for your application. Multiple actions can be bound to this trigger, and the actions will run in order. However, these actions will be run asynchronously and will not block the user registration process. - -### References - -* [Event object](/docs/customize/actions/explore-triggers/signup-and-login-triggers/post-user-registration-trigger/post-user-registration-event-object): Provides contextual information about the newly-created user. -* [API object](/docs/customize/actions/explore-triggers/signup-and-login-triggers/post-user-registration-trigger/api-object): Provides methods for changing the behavior of the flow. - -## Common use cases - -### Notify Slack when a new user registers - -```javascript lines -/** -* Handler that will be called during the execution of a PostUserRegistration flow. -* - * @param {Event} event - Details about the context and user that has registered. - * @param {PostUserRegistrationAPI} api - Interface whose methods can be used to change the behavior of post user registration. - */ - -exports.onExecutePostUserRegistration = async (event, api) => { - const { IncomingWebhook } = require("@slack/webhook"); - const webhook = new IncomingWebhook(event.secrets.SLACK_WEBHOOK_URL); - - const text = `New User: ${event.user.email}`; - const channel = '#some_channel'; - - webhook.send({ text, channel }); -}; -``` - - - - - - - - -For this Action to execute properly, the Action must contain a secret named `SLACK_WEBHOOK_URL` and must have a dependency on the `@slack/webhook` `npm` package. - - - -### Store the Auth0 user id in a remote system - -A post-user-registration Action can be used to store the Auth0 user ID in a remote system. - -```javascript lines -/** -* Handler that will be called during the execution of a PostUserRegistration flow. -* -* @param {Event} event - Details about the context and user that has registered. -* @param {PostUserRegistrationAPI} api - Interface whose methods can be used to change the behavior of post user registration. -*/ - -const axios = require("axios"); - -exports.onExecutePostUserRegistration = async (event, api) => { - await axios.post("https://my-api.exampleco.com/users", { params: { email: event.user.email }}); -}; -``` - - - - - - - - -To use an `npm` library like `axios`, you must add the library to the Action as a dependency. To learn more, read the "Add a dependency" section in [Write Your First Action](/docs/customize/actions/write-your-first-action). - - - -### Deny access to specific JA3/JA4 fingerprints - -The `event.security_context` object contains the JA3/JA4 fingerprint values for the current transaction. - -```js lines -exports.onExecutePreUserRegistration = async (event, api) => { - const clientJa4 = event?.security_context?.ja4; - console.log('[ACTION]', {clientJa4}); - const badFingerprints = ['t13d1517h2_8daaf6152771_b6f405a00624','t13d1516h2_8daaf6152771_d8a2da3f94cd']; - if (clientJa4 && badFingerprints.includes(clientJa4)){ - api.access.deny('suspicious_tls_fingerprint', 'Your TLS fingerprint has been flagged as suspicious'); - } -}; -``` - - - diff --git a/main/docs/customize/actions/explore-triggers/signup-and-login-triggers/post-user-registration-trigger/api-object.mdx b/main/docs/customize/actions/explore-triggers/signup-and-login-triggers/post-user-registration-trigger/api-object.mdx deleted file mode 100644 index 2a6f41fda7..0000000000 --- a/main/docs/customize/actions/explore-triggers/signup-and-login-triggers/post-user-registration-trigger/api-object.mdx +++ /dev/null @@ -1,63 +0,0 @@ ---- -description: Learn about the post-user-registration Action trigger's API object. -title: 'Actions Triggers: post-user-registration - API Object' ---- -The API object for the `post-user-registration` Actions trigger includes: - -## `api.cache` - -Store and retrieve data that persists across executions. - -### `api.cache.delete(key)` - -Delete a record describing a cached value at the supplied key if it exists. - -Returns a `CacheWriteResult` object with `type: "success"` if a value was removed from the cache. A failed operation returns `type: "error"`. For errors, the returned object will have a -`code` property that indicates the nature of the failure. - -| Parameter | Description | -| --- | --- | -| `key` | *String*. The key of the record stored in the cache. | - -### `api.cache.get(key)` - -Retrieve a record describing a cached value at the supplied -`key`, if it exists. If a record is found, the cached value can -be found at the `value` property of the returned object. - -Returns a cache record if an item is found in the cache for the supplied -`key`. Cache records are objects with a -`value` property holding the cached value as well as an -`expires_at` property indicating the maximum expiry of -the record in milliseconds since the Unix epoch. - -**Important:** -This cache is designed for short-lived, ephemeral data. Items may not be -available in later transactions even if they are within their supplied their -lifetime. - -| Parameter | Description | -| --- | --- | -| `key` | *String*. The key of the record stored in the cache. | - -### `api.cache.set(key, value, [options])` - -Store or update a string value in the cache at the specified key. - -Values stored in this cache are scoped to the Trigger in which they are set. -They are subject to the -[Actions Cache Limits](/docs/customize/actions/limitations). - -Values stored in this way will have lifetimes of up to the specified -`ttl` or `expires_at` values. If no lifetime is -specified, a default of lifetime of 15 minutes will be used. Lifetimes may -not exceed the maximum duration listed at -[Actions Cache Limits](/docs/customize/actions/limitations). - -| Parameter | Description | -| --- | --- | -| `key` | *String*. The key of the record stored in the cache. | -| `value` | *String*. The value of the record to be stored. | -| `options` | *Optional object*. Options for adjusting cache behavior. | -| `options.expires_at` | *Optional number*. The absolute expiry time in milliseconds since the unix epoch. While cached records may be evicted earlier, they will never remain beyond the the supplied `expires_at`.
*Note:* This value should not be supplied if a value was also provided for `ttl`. If both options are supplied, the earlier expiry of the two will be used. | -| `options.ttl` | *Optional number*. The time-to-live value of this cache entry in milliseconds. While cached values may be evicted earlier, they will never remain beyond the the supplied `ttl`.
*Note:* This value should not be supplied if a value was also provided for `expires_at`. If both options are supplied, the earlier expiry of the two will be used. | diff --git a/main/docs/customize/actions/explore-triggers/signup-and-login-triggers/pre-user-registration-trigger.mdx b/main/docs/customize/actions/explore-triggers/signup-and-login-triggers/pre-user-registration-trigger.mdx deleted file mode 100644 index 75d98ba1f7..0000000000 --- a/main/docs/customize/actions/explore-triggers/signup-and-login-triggers/pre-user-registration-trigger.mdx +++ /dev/null @@ -1,146 +0,0 @@ ---- -description: Learn about the Pre User Registration Flow, which runs when a user attempts to register through a Database or Passwordless connection. It can be used to add metadata to the user profile before it is created or to deny a registration. -sidebarTitle: Overview -title: Pre-user Registration Trigger ---- -The Pre-user Registration trigger runs before a user is added to a Database or Passwordless Connection. - -![Diagram showing the Actions Pre User Registration Flow.](/docs/images/cdy7uua7fh8z/2KtUcZhaBcT12GxjhBJZFG/9633b4454ac1c06c0deed6c97e70fe7d/pre-user-registration-flow.png) - -Actions in this flow are blocking (synchronous), which means they execute as part of a trigger's process and will prevent the rest of the Auth0 pipeline from running until the Action is complete. - -## Triggers - -### Pre-user Registration - -The `pre-user-registration`  triggers runs when a user attempts to register through a Database or Passwordless connection. This trigger can be used to add metadata to the user profile before it is created or to deny a registration with custom logic. - - - -You cannot currently use `pre-user-registration` Actions to add metadata to passwordless users. - - - -#### References - -* [Event object](/docs/customize/actions/explore-triggers/signup-and-login-triggers/pre-user-registration-trigger/pre-user-registration-event-object): Provides contextual information about the request to register a new user. -* [API object](/docs/customize/actions/explore-triggers/signup-and-login-triggers/pre-user-registration-trigger/pre-user-registration-api-object): Provides methods for changing the behavior of the flow. - -## Common use cases - -### Deny registration by location - -A pre-user registration Action can be used to prevent a user from signing up. - -```javascript lines -/** - * @param {Event} event - Details about registration event. - * @param {PreUserRegistrationAPI} api - */ -exports.onExecutePreUserRegistration = async (event, api) => { - if (event.request.geoip.continentCode === "NA") { - - // localize the error message - const LOCALIZED_MESSAGES = { - en: 'You are not allowed to register.', - es: 'No tienes permitido registrarte.' - }; - - const userMessage = LOCALIZED_MESSAGES[event.request.language] || LOCALIZED_MESSAGES['en']; - api.access.deny('no_signups_from_north_america', userMessage); - } -}; -``` - - - - - - -### Set metadata in the user profile - -A pre-user registration Action can be used to add metadata to the user profile before it is created. - - - -You cannot currently use `pre-user-registration` Actions to add metadata to passwordless users. - - - -```javascript lines -/** - * @param {Event} event - Details about registration event. - * @param {PreUserRegistrationAPI} api - */ -exports.onExecutePreUserRegistration = async (event, api) => { - api.user.setUserMetadata("screen_name", "username"); -}; -``` - - - - - - -### Store a user ID from another system in the user profile - -A pre-user registration Action can be used to store a user ID from another system in the user profile. - -```javascript lines expandable -const axios = require('axios'); - -const REQUEST_TIMEOUT = 2000; // Example timeout - -/** -* Handler that will be called during the execution of a PreUserRegistration flow. -* -* @param {Event} event - Details about the context and user that is attempting to register. -* @param {PreUserRegistrationAPI} api - Interface whose methods can be used to change the behavior of the signup. -*/ -exports.onExecutePreUserRegistration = async (event, api) => { - try { - // Set a secret USER_SERVICE_URL = 'https://yourservice.com' - const remoteUser = await axios.get(event.secrets.USER_SERVICE_URL, { - timeout: REQUEST_TIMEOUT, - params: { - email: event.user.email - } - }); - - if (remoteUser) { - api.user.setAppMetadata('my-api-user-id', remoteUser.id); - } - } catch (err) { - api.validation.error('custom_error', 'Custom Error'); - } -}; -``` - - - - - - - - -To use an `npm` library like `axios`, you must add the library to the Action as a dependency. To learn more, read the "Add a dependency" section in [Write Your First Action](/docs/customize/actions/write-your-first-action). - - - -### Deny access to specific JA3/JA4 fingerprints - -The `event.security_context` object contains the JA3/JA4 fingerprint values for the current transaction. - -```js lines -exports.onExecutePreUserRegistration = async (event, api) => { - const clientJa4 = event?.security_context?.ja4; - console.log('[ACTION]', {clientJa4}); - const badFingerprints = ['t13d1517h2_8daaf6152771_b6f405a00624','t13d1516h2_8daaf6152771_d8a2da3f94cd']; - if (clientJa4 && badFingerprints.includes(clientJa4)){ - api.access.deny('suspicious_tls_fingerprint', 'Your TLS fingerprint has been flagged as suspicious'); - } -}; -``` - - - diff --git a/main/docs/customize/actions/explore-triggers/signup-and-login-triggers/login-trigger/redirect-with-actions.mdx b/main/docs/customize/actions/redirect-with-actions.mdx similarity index 100% rename from main/docs/customize/actions/explore-triggers/signup-and-login-triggers/login-trigger/redirect-with-actions.mdx rename to main/docs/customize/actions/redirect-with-actions.mdx diff --git a/main/docs/customize/actions/reference.mdx b/main/docs/customize/actions/reference.mdx new file mode 100644 index 0000000000..dc30d90ed0 --- /dev/null +++ b/main/docs/customize/actions/reference.mdx @@ -0,0 +1,36 @@ +--- +title: Actions Reference Overview +sidebarTitle: Overview +description: Reference the event and api objects available to Auth0 Actions for each trigger, detailing the transaction data you can read and the methods you can call from your custom code. +--- + +Every Auth0 Action receives two objects when its trigger fires: + +* The **event object** is read-only transaction context: details about the user, request, client, tenant, and connection at the moment the trigger fired. +* The **api object** exposes the methods your Action can call to change the outcome of the transaction, such as denying access, adding token claims, triggering challenges, or caching data. + +The objects available differ per trigger. Select a trigger below to explore its event and api object reference. To learn when each trigger fires and how to attach Actions to it, read [Explore Triggers](/docs/customize/actions/explore-triggers). + +## Triggers + +| Trigger | Reference | Fires... | +| --- | --- | --- | +| Credentials Exchange | [Event object](/docs/customize/actions/reference/credentials-exchange/credentials-exchange-event-object) · [API object](/docs/customize/actions/reference/credentials-exchange/credentials-exchange-api-object) | During a machine-to-machine Client Credentials exchange, before the access token is issued. | +| Custom Phone Provider | [Event object](/docs/customize/actions/reference/custom-phone-provider/custom-phone-provider-event-object) · [API object](/docs/customize/actions/reference/custom-phone-provider/custom-phone-provider-api-object) | When Auth0 sends a phone message through a [custom phone provider](/docs/customize/phone-messages/configure-phone-messaging-providers/configure-a-custom-phone-provider). | +| Custom Email Provider | [Event object](/docs/customize/actions/reference/custom-email-provider/custom-email-provider-event-object) · [API object](/docs/customize/actions/reference/custom-email-provider/custom-email-provider-api-object) | When Auth0 sends an email through a [custom email provider](/docs/customize/email/smtp-email-providers/custom). | +| Custom Token Exchange | [Event object](/docs/customize/actions/reference/custom-token-exchange/custom-token-exchange-event-object) · [API object](/docs/customize/actions/reference/custom-token-exchange/custom-token-exchange-api-object) | During a custom token exchange request, when an external subject token is exchanged for Auth0 tokens. | +| Event Stream | [Event object](/docs/customize/actions/reference/event-stream/event-stream-event-object) · [API object](/docs/customize/actions/reference/event-stream/event-stream-api-object) | Asynchronously when a subscribed Event Type occurs on an Event Stream. | +| Password Reset Post Challenge | [Event object](/docs/customize/actions/reference/password-reset-post-challenge/password-reset-post-challenge-event-object) · [API object](/docs/customize/actions/reference/password-reset-post-challenge/password-reset-post-challenge-api-object) | After the first password-reset challenge is completed and before the password is reset. | +| Post User Registration | [Event object](/docs/customize/actions/reference/post-user-registration/post-user-registration-event-object) · [API object](/docs/customize/actions/reference/post-user-registration/post-user-registration-api-object) | Asynchronously after a user is added to a database or passwordless connection. | +| Post Login | [Event object](/docs/customize/actions/reference/post-login/post-login-event-object) · [API object](/docs/customize/actions/reference/post-login/post-login-api-object) | After a user is authenticated but before a token is issued. | +| Post Change Password | [Event object](/docs/customize/actions/reference/post-change-password/post-change-password-event-object) · [API object](/docs/customize/actions/reference/post-change-password/post-change-password-api-object) | After a user's password is changed or reset. | +| Pre User Registration | [Event object](/docs/customize/actions/reference/pre-user-registration/pre-user-registration-event-object) · [API object](/docs/customize/actions/reference/pre-user-registration/pre-user-registration-api-object) | Before a user is created in a database or passwordless connection. | +| Send Phone Message | [Event object](/docs/customize/actions/reference/send-phone-message/send-phone-message-event-object) · [API object](/docs/customize/actions/reference/send-phone-message/send-phone-message-api-object) | When a custom provider sends the MFA enrollment and challenge phone messages. | + +## Resources + +| Read... | To learn... | +| --- | --- | +| [Explore Triggers](/docs/customize/actions/explore-triggers) | When each trigger fires and how Actions attach to it. | +| [Write Your First Action](/docs/customize/actions/write-your-first-action) | How to build, test, and deploy an Action end to end. | +| [Actions Limitations](/docs/customize/actions/limitations) | The size, execution, and rate limit constraints that apply to Actions. | diff --git a/main/docs/customize/email/smtp-email-providers/custom.mdx b/main/docs/customize/email/smtp-email-providers/custom.mdx index ff522045d9..3cebc8d3d9 100644 --- a/main/docs/customize/email/smtp-email-providers/custom.mdx +++ b/main/docs/customize/email/smtp-email-providers/custom.mdx @@ -12,5 +12,5 @@ This gives you more control over the email delivery process and lets you impleme | Read... | To learn... | |---------|-------------| | [Configure an Custom Email Provider Action](/docs/customize/email/smtp-email-providers/custom/configure-action) | How to use the Auth0 Dashboard or the Terraform Auth0 provider to configure your tenant with an email provider Action. | -| [Action Triggers: custom-email-provider Event Object](/docs/customize/email/configure-a-custom-email-provider/action-triggers-custom-email-provider-event-object) | The properties available in the `custom-email-provider` Actions trigger `event` object. | -| [Action Triggers: custom-email-provider API Object](/docs/customize/email/configure-a-custom-email-provider/action-triggers-custom-email-provider-api-object) | The properties available in the `custom-email-provider` Actions trigger API object. | +| [Action Triggers: custom-email-provider Event Object](/docs/customize/actions/reference/custom-email-provider/custom-email-provider-event-object) | The properties available in the `custom-email-provider` Actions trigger `event` object. | +| [Action Triggers: custom-email-provider API Object](/docs/customize/actions/reference/custom-email-provider/custom-email-provider-api-object) | The properties available in the `custom-email-provider` Actions trigger API object. | diff --git a/main/docs/customize/email/smtp-email-providers/custom/configure-action.mdx b/main/docs/customize/email/smtp-email-providers/custom/configure-action.mdx index b9b0d6261f..93bac7cea5 100644 --- a/main/docs/customize/email/smtp-email-providers/custom/configure-action.mdx +++ b/main/docs/customize/email/smtp-email-providers/custom/configure-action.mdx @@ -110,7 +110,7 @@ If you create a new email provider Action with Terraform and it does not take ef This is an example Action for the `custom-email-provider` trigger. -In this code sample, the function `onExecuteCustomEmailProvider` takes two arguments from the [`custom-email-provider` event object](/docs/customize/email/configure-a-custom-email-provider/action-triggers-custom-email-provider-event-object): `event`, which contains information about the user and the context of the notification, and `api`, which provides helper methods for custom behavior while sending notifications. +In this code sample, the function `onExecuteCustomEmailProvider` takes two arguments from the [`custom-email-provider` event object](/docs/customize/actions/reference/custom-email-provider/custom-email-provider-event-object): `event`, which contains information about the user and the context of the notification, and [`custom-email-provider` api object](/docs/customize/actions/reference/custom-email-provider/custom-email-provider-api-object): `api`, which provides helper methods for custom behavior while sending notifications. ```javascript lines expandable /** diff --git a/main/docs/customize/phone-messages/configure-phone-messaging-providers/configure-a-custom-phone-provider.mdx b/main/docs/customize/phone-messages/configure-phone-messaging-providers/configure-a-custom-phone-provider.mdx index ae75f557fb..d21b443646 100644 --- a/main/docs/customize/phone-messages/configure-phone-messaging-providers/configure-a-custom-phone-provider.mdx +++ b/main/docs/customize/phone-messages/configure-phone-messaging-providers/configure-a-custom-phone-provider.mdx @@ -97,8 +97,8 @@ An example of a custom phone provider you can configure is [Twilio Verify](https The `custom-phone-provider` trigger is different from the `send-phone-message` trigger, which should not be used for configuring a custom phone provider. To learn more, read the following: -* [Action Triggers: custom-phone-provider API Object](/docs/customize/phone-messages/configure-phone-messaging-providers/configure-a-custom-phone-provider/action-triggers-custom-phone-provider-api-object) -* [Action Triggers: custom-phone-provider Event Object](/docs/customize/phone-messages/configure-phone-messaging-providers/configure-a-custom-phone-provider/actions-triggers-custom-phone-provider-event-object) +* [Action Triggers: custom-phone-provider API Object](/docs/customize/actions/reference/custom-phone-provider/custom-phone-provider-api-object) +* [Action Triggers: custom-phone-provider Event Object](/docs/customize/actions/reference/custom-phone-provider/custom-phone-provider-event-object) The following code sample is a `custom-phone-provider` Action that has the functionality of a `send-phone-message` Action: diff --git a/main/icons/actions-reference.svg b/main/icons/actions-reference.svg new file mode 100644 index 0000000000..36f7f621bb --- /dev/null +++ b/main/icons/actions-reference.svg @@ -0,0 +1,5 @@ + + + + +