Skip to content

Conversation

aks96
Copy link
Contributor

@aks96 aks96 commented Aug 26, 2025

Description

This PR introduces the startMfaPushPolling utility function to the auth0-acul-js package.
The function enables polling for MFA push challenge approval at a user-defined interval, using an instance of MfaPushChallengePush.
It simplifies the process of repeatedly sending push requests until cancelled, without requiring a maximum attempts parameter.

Added startMfaPushPolling implementation in src/helpers/startMfaPushPolling.ts
Exported the function from the package entry point (index.ts)
Allows consumers to easily start and stop polling for MFA push challenges in their applications

@aks96 aks96 requested a review from a team as a code owner August 26, 2025 09:41
@aks96 aks96 requested a review from nandan-bhat August 26, 2025 09:41
@@ -0,0 +1,57 @@
# MFA Push Polling Utility

This utility provides robust polling for MFA push notifications in React applications. It ensures a push request is sent immediately and then at a specified interval, until the polling is cancelled (e.g., on component unmount or dependency change).
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do we have this .MD file isnide helpers folder ? This should be inside examples folder.

* @param transaction Instance of MfaPushChallengePush
* @returns cancel function to stop polling
*/
export function startMfaPushPolling(
Copy link
Contributor

@nandan-bhat nandan-bhat Aug 26, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This implementation is not correct. The example we have on the RFC is outdated and we have explicitly called it out.

There's a note in the RFC regarding how it should be implemented.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have push the changes following the implementation needed.Please review @nandan-bhat

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants