# Triggers post-mfa action

**URL:** <https://community.auth0.com/t/triggers-post-mfa-action/176585>\
**Category:** Get Help\
**Tags:** one-time-password-otp-factor, mfa\
**Created:** [January 31, 2025, 11:54am UTC](https://community.auth0.com/t/triggers-post-mfa-action/176585 "2025-01-31T11:54:24Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![malek.babaz69](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/malek.babaz69/32/70839_2.png) [@malek.babaz69](https://community.auth0.com/u/malek.babaz69)\
**Post date:** [January 31, 2025, 11:54am UTC](https://community.auth0.com/t/triggers-post-mfa-action/176585/1 "2025-01-31T11:54:24Z")

</div>

Hello,

I’m implementing a third party service that give an ID during the post-login action and I wan’t to send back this ID on post-mfa (once user validates the OTP code challenge).

Do we have any ways to use triggers / actions to do something during post-mfa after user OTP validation?

Thank you in advance.

---

<div class="post-metadata">

**Author:** ![dawid.matuszczyk](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/dawid.matuszczyk/32/74550_2.png) [@dawid.matuszczyk](https://community.auth0.com/u/dawid.matuszczyk)\
**Post date:** [January 31, 2025, 12:28pm UTC](https://community.auth0.com/t/triggers-post-mfa-action/176585/2 "2025-01-31T12:28:20Z")

</div>

Hi @malek.babaz69

Welcome to the Auth0 Community!

Thank you for posting your question. You can utilize the API.authentication.challengeWith() method to challenge the user with MFA, which will pause the action’s execution pipeline. After the user finishes the MFA, you can send the ID to 3rd party.

[https://community.auth0.com/t/custom-action-to-decide-mfa-frequency-for-universal-login-flows/90620](https://community.auth0.com/t/custom-action-to-decide-mfa-frequency-for-universal-login-flows/90620)  
[https://auth0.com/docs/customize/actions/explore-triggers/signup-and-login-triggers/login-trigger/post-login-api-object#:~:text=api.authentication.challengeWith(factor%2C%20options)](https://auth0.com/docs/customize/actions/explore-triggers/signup-and-login-triggers/login-trigger/post-login-api-object#:~:text=api.authentication.challengeWith(factor%2C%20options))

Thanks  
Dawid

---

<div class="post-metadata">

**Author:** ![malek.babaz69](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/malek.babaz69/32/70839_2.png) [@malek.babaz69](https://community.auth0.com/u/malek.babaz69)\
**Post date:** [January 31, 2025, 2:55pm UTC](https://community.auth0.com/t/triggers-post-mfa-action/176585/3 "2025-01-31T14:55:19Z")

</div>

> [@dawid.matuszczyk](#):
>
> After the user finishes the MFA, you can send the ID to 3rd party.

Thank you for your answer! I’m not sure to understand this. Can I send the ID to 3rd party in the process of triggers/actions?  
I mean, I’ll use `exports.onExecutePostLogin` to active OTP with `api.authentication.challengeWithAny([{type: 'otp'}]);`, but when do I trigger the MFA validation? Do I have another key function like `exports.onExecutePostLogin` but for MFA?

---

<div class="post-metadata">

**Author:** ![malek.babaz69](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/malek.babaz69/32/70839_2.png) [@malek.babaz69](https://community.auth0.com/u/malek.babaz69)\
**Post date:** [January 31, 2025, 3:14pm UTC](https://community.auth0.com/t/triggers-post-mfa-action/176585/4 "2025-01-31T15:14:22Z")

</div>

Oh my bad, I’ve just to do this on `exports.onExecutePostLogin` on another action, my bad! Thank you 🙂

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/auth0/original/3X/b/5/b560f266932fcce5d57f09a6595bd50518cae3f3.jpeg) [@system](https://community.auth0.com/u/system)\
**Post date:** [February 14, 2025, 3:14pm UTC](https://community.auth0.com/t/triggers-post-mfa-action/176585/5 "2025-02-14T15:14:59Z")

</div>

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