Skip to content

Commit 310cc65

Browse files
authored
Update MfaPushChallengePush.mdx
1 parent ff5ccc7 commit 310cc65

File tree

1 file changed

+103
-69
lines changed

1 file changed

+103
-69
lines changed

main/docs/libraries/acul/js-sdk/Screens/classes/MfaPushChallengePush.mdx

Lines changed: 103 additions & 69 deletions
Original file line numberDiff line numberDiff line change
@@ -2,96 +2,114 @@
22
title: "MfaPushChallengePush"
33
---
44

5-
Class implementing the mfa-push-challenge-push screen functionality
6-
This screen is shown when a user needs to confirm a push notification during MFA
5+
The MfaPushChallengePush class implements the `mfa-push-challenge-push` screen functionality. This screen is shown when a user needs to confirm a push notification during MFA.
76

8-
```ts Example
9-
const mfaPushChallengePush = new MfaPushChallengePush();
10-
await mfaPushChallengePush.continue();
11-
```
7+
<Frame><img style={{maxHeight:"400px"}} src="/docs/images/ja-jp/cdy7uua7fh8z/6n6fftBZDpoT5FdmipebK6/3a777c3c9a87a6f6cf53cf96aab67c8d/Screenshot_2025-02-20_at_22.13.55.png" alt="MfaEmailChallenge" /></Frame>
128

139
## Constructors
1410

15-
<ParamField body="MfaPushChallengePush" type="Constructor">
11+
Create an instance of MfaPushChallengePush screen
1612

17-
Creates an instance of MfaPushChallengePush screen manager
13+
```ts Example
14+
import MfaPushChallengePush from '@auth0/auth0-acul-js/mfa-push-challenge-push';
15+
const mfaPushChallengePush = new MfaPushChallengePush();
16+
await mfaPushChallengePush.continue();
17+
```
1818

19-
</ParamField>
2019
## Properties
2120

22-
<ParamField body='branding' type={<span><a href="/docs/libraries/acul/js-sdk/Screens/interfaces/BrandingMembers">BrandingMembers</a></span>}/>
23-
24-
<ParamField body='client' type={<span><a href="/docs/libraries/acul/js-sdk/Screens/interfaces/ClientMembers">ClientMembers</a></span>}/>
21+
<ParamField body='branding' type={<span><a href="/docs/libraries/acul/js-sdk/Screens/interfaces/BrandingMembers">BrandingMembers</a></span>}>
22+
Provides branding-related configurations, such as branding theme and settings.
23+
</ParamField>
2524

26-
<ParamField body='organization' type={<span><a href="/docs/libraries/acul/js-sdk/Screens/interfaces/OrganizationMembers">OrganizationMembers</a></span>}/>
25+
<ParamField body='client' type={<span><a href="/docs/libraries/acul/js-sdk/Screens/interfaces/ClientMembers">ClientMembers</a></span>}>
26+
Provides client-related configurations, such as `id`, `name`, and `logoUrl`.
27+
</ParamField>
2728

28-
<ParamField body='prompt' type={<span><a href="/docs/libraries/acul/js-sdk/Screens/interfaces/PromptMembers">PromptMembers</a></span>}/>
29+
<ParamField body='organization' type={<span><a href="/docs/libraries/acul/js-sdk/Screens/interfaces/OrganizationMembers">OrganizationMembers</a></span>}>
30+
Provides information about the user's organization, such as organization `id` and `name`.
31+
</ParamField>
2932

30-
<ParamField body='screen' type={<span><a href="/docs/libraries/acul/js-sdk/Screens/interfaces/ScreenMembersOnMfaPushChallengePush">ScreenMembersOnMfaPushChallengePush</a></span>}/>
33+
<ParamField body='prompt' type={<span><a href="/docs/libraries/acul/js-sdk/Screens/interfaces/PromptMembers">PromptMembers</a></span>}>
34+
Contains data about the current prompt in the authentication flow.
35+
</ParamField>
3136

32-
<ParamField body='tenant' type={<span><a href="/docs/libraries/acul/js-sdk/Screens/interfaces/TenantMembers">TenantMembers</a></span>}/>
37+
<ParamField body='screen' type={<span><a href="/docs/libraries/acul/js-sdk/Screens/interfaces/ScreenMembersOnMfaPushChallengePush">ScreenMembersOnMfaPushChallengePush</a></span>}>
38+
Contains details specific to the `mfa-push-challenge-push` screen, including its configuration and context.
39+
</ParamField>
3340

34-
<ParamField body='transaction' type={<span><a href="/docs/libraries/acul/js-sdk/Screens/interfaces/TransactionMembers">TransactionMembers</a></span>}/>
41+
<ParamField body='tenant' type={<span><a href="/docs/libraries/acul/js-sdk/Screens/interfaces/TenantMembers">TenantMembers</a></span>}>
42+
Contains data related to the tenant, such as `id` and associated metadata.
43+
</ParamField>
3544

36-
<ParamField body='untrustedData' type={<span><a href="/docs/libraries/acul/js-sdk/Screens/interfaces/UntrustedDataMembersOnMfaPushChallengePush">UntrustedDataMembersOnMfaPushChallengePush</a></span>}/>
45+
<ParamField body='transaction' type={<span><a href="/docs/libraries/acul/js-sdk/Screens/interfaces/TransactionMembers">TransactionMembers</a></span>}>
46+
Provides transaction-specific data, such as active identifiers and flow states.
47+
</ParamField>
3748

38-
<ParamField body='user' type={<span><a href="/docs/libraries/acul/js-sdk/Screens/interfaces/UserMembers">UserMembers</a></span>}/>
49+
<ParamField body='untrustedData' type={<span><a href="/docs/libraries/acul/js-sdk/Screens/interfaces/UntrustedDataMembersOnMfaPushChallengePush">UntrustedDataMembersOnMfaPushChallengePush</a></span>}>
50+
Handles untrusted data passed to the SDK, such as user input during login.
51+
</ParamField>
3952

40-
<ParamField body='screenIdentifier' type='string'/>
53+
<ParamField body='user' type={<span><a href="/docs/libraries/acul/js-sdk/Screens/interfaces/UserMembers">UserMembers</a></span>}>
54+
Details of the active user, including `username`, `email`, and `roles`.
55+
</ParamField>
4156

4257
## Methods
4358

44-
<ParamField body='continue' type='Promise<void>'>
45-
46-
Continues with the push notification challenge
59+
<ParamField body='continue' type='(options ?)'>
60+
This method continues with the push notification challenge.
4761

4862
```typescript Example
4963
const mfaPushChallengePush = new MfaPushChallengePush();
5064
await mfaPushChallengePush.continue();
5165
```
5266

53-
<Expandable title="Parameters">
54-
<ParamField body='payload?' type={<span><a href="/docs/libraries/acul/js-sdk/Screens/interfaces/WithRememberOptions">WithRememberOptions</a></span>}>
55-
**Properties**
67+
<ParamField body="options" type="OPTIONAL">
68+
Optional custom options to include with the request.
69+
70+
<Expandable title="options properties">
5671

57-
<ParamField body='rememberDevice?' type='boolean'/>
72+
<ParamField body='rememberDevice?' type='boolean'>
73+
Indicates whether to remember the device.
5874
</ParamField>
5975

60-
</Expandable>
76+
<ParamField body='[`key`: `string`]' type='"string" | "number" | "boolean" | "undefined"' >
77+
Additional data collected from the user.
6178
</ParamField>
6279

63-
<ParamField body='enterCodeManually' type='Promise<void>'>
80+
</Expandable>
81+
</ParamField>
82+
</ParamField>
6483

65-
Switches to entering the verification code manually
84+
<ParamField body='enterCodeManually' type='(options ?)'>
85+
This method switches to entering the verification code manually.
6686

6787
```typescript Example
6888
const mfaPushChallengePush = new MfaPushChallengePush();
6989
await mfaPushChallengePush.enterCodeManually();
7090
```
7191

72-
<Expandable title="Parameters">
73-
<ParamField body='payload?' type={<span><a href="/docs/libraries/acul/js-sdk/Screens/interfaces/CustomOptions">CustomOptions</a></span>}>
74-
75-
Optional custom options to include with the request
92+
<ParamField body="options" type="OPTIONAL">
93+
Optional custom options to include with the request.
7694

95+
<Expandable title="options properties">
96+
<ParamField body='[`key`: `string`]' type='"string" | "number" | "boolean" | "undefined"' >
97+
Additional data collected from the user.
7798
</ParamField>
7899

79100
</Expandable>
80101
</ParamField>
102+
</ParamField>
81103

82104
<ParamField body='getErrors' type={<span><a href="/docs/libraries/acul/js-sdk/Screens/interfaces/Error">Error</a>[]</span>}>
83105

84-
Retrieves the array of transaction errors from the context, or an empty array if none exist.
85-
86-
An array of error objects from the transaction context.
106+
This method retrieves the array of transaction errors from the context, or an empty array if none exist.
87107

88108
</ParamField>
89109

90110
<ParamField body='pollingManager' type={<span><a href="/docs/libraries/acul/js-sdk/Screens/interfaces/MfaPushPollingControl">MfaPushPollingControl</a></span>}>
91111

92-
**`Utility Feature`**
93-
94-
Starts and manages polling for an MFA push challenge.
112+
This method starts and manages polling for an MFA push challenge.
95113

96114
Creates a polling session that repeatedly checks the MFA push challenge endpoint
97115
at the specified interval until the challenge is approved or an error occurs.
@@ -102,7 +120,7 @@ polling stops automatically.
102120
Use the returned [MfaPushPollingControl](/docs/libraries/acul/js-sdk/Screens/interfaces/MfaPushPollingControl) to start, stop, or check the
103121
status of the polling process at any time.
104122

105-
A [MfaPushPollingControl](/docs/libraries/acul/js-sdk/Screens/interfaces/MfaPushPollingControl) instance exposing:
123+
Returns an [MfaPushPollingControl](/docs/libraries/acul/js-sdk/Screens/interfaces/MfaPushPollingControl) instance exposing:
106124
- `startPolling()` — Starts or resumes polling.
107125
- `stopPolling()` — Cancels polling immediately.
108126
- `isRunning()` — Indicates whether polling is currently active.
@@ -119,68 +137,84 @@ const control = mfaPushChallengePush.pollingManager({
119137
control.stopPolling();
120138
```
121139

122-
#### Remarks
140+
**Remarks**
123141

124142
- HTTP 429 (rate limit) responses are handled internally: polling automatically
125143
waits until the rate limit resets before retrying.
126144
- Safe to call `startPolling()` multiple times; it has no effect if already running.
127145

128-
<Expandable title="Parameters">
129-
<ParamField body='options' type={<span><a href="/docs/libraries/acul/js-sdk/Screens/type-aliases/MfaPollingOptions">MfaPollingOptions</a></span>}>
130-
**Properties**
131-
132-
<ParamField body='MfaPollingOptions' type='object'/>
133-
134-
<ParamField body='intervalMs?' type='number'/>
146+
<ParamField body="options" type="OPTIONAL">
147+
Configuration options for managing an MFA push-notification polling process.
135148

136-
<ParamField body='onCompleted()?' type='() => void'/>
149+
<Expandable title="options properties">
137150

138-
<ParamField body='onError()?' type='(error) => void'/>
139-
140-
<ParamField body='code' type='string'/>
151+
<ParamField body='intervalMs?' type='number'>
152+
Optional interval, in milliseconds, between consecutive polling requests.
153+
* If omitted, the SDK’s internal default interval is used (typically 5000 ms).
154+
* Choose a value that balances responsiveness with rate-limit considerations.
155+
</ParamField>
141156

142-
<ParamField body='field?' type='string'/>
157+
<ParamField body='onCompleted()?' type='() => void'>
158+
Optional callback executed once the MFA push challenge is successfully approved and polling completes.
159+
* Called exactly once, after which polling stops automatically.
160+
* Useful for advancing the login flow (e.g., calling continue()).
161+
</ParamField>
143162

144-
<ParamField body='message' type='string'/>
163+
<ParamField body='onError()?' type='(error) => void'>
164+
Optional callback invoked if an error occurs while polling.
165+
Receives an ULError object containing:
166+
* `status` — the HTTP status code from the failed request
167+
* `responseText` — the raw response body, if available
168+
* Called once per error event; polling may retry depending on error type.
169+
* Use to surface error messages or trigger custom retry/abort logic.
145170
</ParamField>
146171

147172
</Expandable>
148173
</ParamField>
174+
</ParamField>
149175

150-
<ParamField body='resendPushNotification' type='Promise<void>'>
151-
152-
Resends the push notification
176+
<ParamField body='resendPushNotification' type='(options ?)'>
177+
This method resends the push notification.
153178

154179
```typescript Example
155180
const mfaPushChallengePush = new MfaPushChallengePush();
156181
await mfaPushChallengePush.resendPushNotification();
157182
```
158183

159-
<Expandable title="Parameters">
160-
<ParamField body='payload?' type={<span><a href="/docs/libraries/acul/js-sdk/Screens/interfaces/WithRememberOptions">WithRememberOptions</a></span>}>
161-
**Properties**
184+
<ParamField body="options" type="OPTIONAL">
185+
Optional custom options to include with the request
186+
187+
<Expandable title="options properties">
188+
189+
<ParamField body='rememberDevice?' type='boolean'>
190+
Indicates whether to remember the device.
191+
</ParamField>
162192

163-
<ParamField body='rememberDevice?' type='boolean'/>
193+
<ParamField body='[`key`: `string`]' type='"string" | "number" | "boolean" | "undefined"' >
194+
Additional data collected from the user.
164195
</ParamField>
165196

166197
</Expandable>
167198
</ParamField>
199+
</ParamField>
168200

169-
<ParamField body='tryAnotherMethod' type='Promise<void>'>
170201

171-
Allows trying another authentication method
202+
<ParamField body='tryAnotherMethod' type='(options ?)'>
203+
This method allows the user to try another MFA method.
172204

173205
```typescript Example
174206
const mfaPushChallengePush = new MfaPushChallengePush();
175207
await mfaPushChallengePush.tryAnotherMethod();
176208
```
177209

178-
<Expandable title="Parameters">
179-
<ParamField body='payload?' type={<span><a href="/docs/libraries/acul/js-sdk/Screens/interfaces/CustomOptions">CustomOptions</a></span>}>
180-
181-
Optional custom options to include with the request
210+
<ParamField body="options" type="OPTIONAL">
211+
Optional custom options to include with the request.
182212

213+
<Expandable title="options properties">
214+
<ParamField body='[`key`: `string`]' type='"string" | "number" | "boolean" | "undefined"' >
215+
Any additional custom options.
183216
</ParamField>
184217

185218
</Expandable>
186-
</ParamField>
219+
</ParamField>
220+
</ParamField>

0 commit comments

Comments
 (0)