@auth0/auth0-acul-react 1.0.0-alpha.2 → 1.0.0-alpha.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +77 -77
- package/dist/export/getting-started.d.ts +1 -1
- package/dist/hooks/common/errors.d.ts +12 -12
- package/dist/hooks/common/errors.js +1 -1
- package/dist/hooks/common/errors.js.map +1 -1
- package/dist/hooks/index.d.ts +1 -1
- package/dist/screens/accept-invitation.d.ts +1 -1
- package/dist/screens/accept-invitation.js.map +1 -1
- package/dist/screens/consent.d.ts +1 -1
- package/dist/screens/consent.js.map +1 -1
- package/dist/screens/customized-consent.d.ts +1 -1
- package/dist/screens/customized-consent.js.map +1 -1
- package/dist/screens/device-code-activation-allowed.d.ts +1 -1
- package/dist/screens/device-code-activation-allowed.js.map +1 -1
- package/dist/screens/device-code-activation-denied.d.ts +1 -1
- package/dist/screens/device-code-activation-denied.js.map +1 -1
- package/dist/screens/device-code-activation.d.ts +1 -1
- package/dist/screens/device-code-activation.js.map +1 -1
- package/dist/screens/device-code-confirmation.d.ts +1 -1
- package/dist/screens/device-code-confirmation.js.map +1 -1
- package/dist/screens/email-identifier-challenge.d.ts +1 -1
- package/dist/screens/email-identifier-challenge.js.map +1 -1
- package/dist/screens/email-otp-challenge.d.ts +1 -1
- package/dist/screens/email-otp-challenge.js.map +1 -1
- package/dist/screens/email-verification-result.d.ts +1 -1
- package/dist/screens/email-verification-result.js.map +1 -1
- package/dist/screens/interstitial-captcha.d.ts +1 -1
- package/dist/screens/interstitial-captcha.js.map +1 -1
- package/dist/screens/login-email-verification.d.ts +1 -1
- package/dist/screens/login-email-verification.js.map +1 -1
- package/dist/screens/login-id.d.ts +1 -1
- package/dist/screens/login-id.js.map +1 -1
- package/dist/screens/login-password.d.ts +1 -1
- package/dist/screens/login-password.js.map +1 -1
- package/dist/screens/login-passwordless-email-code.d.ts +1 -1
- package/dist/screens/login-passwordless-email-code.js.map +1 -1
- package/dist/screens/login-passwordless-sms-otp.d.ts +1 -1
- package/dist/screens/login-passwordless-sms-otp.js.map +1 -1
- package/dist/screens/login.d.ts +1 -1
- package/dist/screens/login.js.map +1 -1
- package/dist/screens/logout-aborted.d.ts +1 -1
- package/dist/screens/logout-aborted.js.map +1 -1
- package/dist/screens/logout-complete.d.ts +1 -1
- package/dist/screens/logout-complete.js.map +1 -1
- package/dist/screens/logout.d.ts +1 -1
- package/dist/screens/logout.js.map +1 -1
- package/dist/screens/mfa-begin-enroll-options.d.ts +1 -1
- package/dist/screens/mfa-begin-enroll-options.js.map +1 -1
- package/dist/screens/mfa-country-codes.d.ts +1 -1
- package/dist/screens/mfa-country-codes.js.map +1 -1
- package/dist/screens/mfa-detect-browser-capabilities.d.ts +1 -1
- package/dist/screens/mfa-detect-browser-capabilities.js.map +1 -1
- package/dist/screens/mfa-email-challenge.d.ts +1 -1
- package/dist/screens/mfa-email-challenge.js.map +1 -1
- package/dist/screens/mfa-email-list.d.ts +1 -1
- package/dist/screens/mfa-email-list.js.map +1 -1
- package/dist/screens/mfa-enroll-result.d.ts +1 -1
- package/dist/screens/mfa-enroll-result.js.map +1 -1
- package/dist/screens/mfa-login-options.d.ts +1 -1
- package/dist/screens/mfa-login-options.js.map +1 -1
- package/dist/screens/mfa-otp-challenge.d.ts +1 -1
- package/dist/screens/mfa-otp-challenge.js.map +1 -1
- package/dist/screens/mfa-otp-enrollment-code.d.ts +1 -1
- package/dist/screens/mfa-otp-enrollment-code.js.map +1 -1
- package/dist/screens/mfa-otp-enrollment-qr.d.ts +1 -1
- package/dist/screens/mfa-otp-enrollment-qr.js.map +1 -1
- package/dist/screens/mfa-phone-challenge.d.ts +1 -1
- package/dist/screens/mfa-phone-challenge.js.map +1 -1
- package/dist/screens/mfa-phone-enrollment.d.ts +1 -1
- package/dist/screens/mfa-phone-enrollment.js.map +1 -1
- package/dist/screens/mfa-push-challenge-push.d.ts +1 -1
- package/dist/screens/mfa-push-challenge-push.js.map +1 -1
- package/dist/screens/mfa-push-enrollment-qr.d.ts +3 -2
- package/dist/screens/mfa-push-enrollment-qr.js +1 -1
- package/dist/screens/mfa-push-enrollment-qr.js.map +1 -1
- package/dist/screens/mfa-push-list.d.ts +1 -1
- package/dist/screens/mfa-push-list.js.map +1 -1
- package/dist/screens/mfa-push-welcome.d.ts +1 -1
- package/dist/screens/mfa-push-welcome.js.map +1 -1
- package/dist/screens/mfa-recovery-code-challenge-new-code.d.ts +1 -1
- package/dist/screens/mfa-recovery-code-challenge-new-code.js.map +1 -1
- package/dist/screens/mfa-recovery-code-challenge.d.ts +1 -1
- package/dist/screens/mfa-recovery-code-challenge.js.map +1 -1
- package/dist/screens/mfa-recovery-code-enrollment.d.ts +1 -1
- package/dist/screens/mfa-recovery-code-enrollment.js.map +1 -1
- package/dist/screens/mfa-sms-challenge.d.ts +1 -1
- package/dist/screens/mfa-sms-challenge.js.map +1 -1
- package/dist/screens/mfa-sms-enrollment.d.ts +1 -1
- package/dist/screens/mfa-sms-enrollment.js.map +1 -1
- package/dist/screens/mfa-sms-list.d.ts +1 -1
- package/dist/screens/mfa-sms-list.js.map +1 -1
- package/dist/screens/mfa-voice-challenge.d.ts +1 -1
- package/dist/screens/mfa-voice-challenge.js.map +1 -1
- package/dist/screens/mfa-voice-enrollment.d.ts +1 -1
- package/dist/screens/mfa-voice-enrollment.js.map +1 -1
- package/dist/screens/mfa-webauthn-change-key-nickname.d.ts +1 -1
- package/dist/screens/mfa-webauthn-change-key-nickname.js.map +1 -1
- package/dist/screens/mfa-webauthn-enrollment-success.d.ts +1 -1
- package/dist/screens/mfa-webauthn-enrollment-success.js.map +1 -1
- package/dist/screens/mfa-webauthn-error.d.ts +1 -1
- package/dist/screens/mfa-webauthn-error.js.map +1 -1
- package/dist/screens/mfa-webauthn-not-available-error.d.ts +1 -1
- package/dist/screens/mfa-webauthn-not-available-error.js.map +1 -1
- package/dist/screens/mfa-webauthn-platform-challenge.d.ts +1 -1
- package/dist/screens/mfa-webauthn-platform-challenge.js.map +1 -1
- package/dist/screens/mfa-webauthn-platform-enrollment.d.ts +1 -1
- package/dist/screens/mfa-webauthn-platform-enrollment.js.map +1 -1
- package/dist/screens/mfa-webauthn-roaming-challenge.d.ts +1 -1
- package/dist/screens/mfa-webauthn-roaming-challenge.js.map +1 -1
- package/dist/screens/mfa-webauthn-roaming-enrollment.d.ts +1 -1
- package/dist/screens/mfa-webauthn-roaming-enrollment.js.map +1 -1
- package/dist/screens/organization-picker.d.ts +1 -1
- package/dist/screens/organization-picker.js.map +1 -1
- package/dist/screens/organization-selection.d.ts +1 -1
- package/dist/screens/organization-selection.js.map +1 -1
- package/dist/screens/passkey-enrollment-local.d.ts +1 -1
- package/dist/screens/passkey-enrollment-local.js.map +1 -1
- package/dist/screens/passkey-enrollment.d.ts +1 -1
- package/dist/screens/passkey-enrollment.js.map +1 -1
- package/dist/screens/phone-identifier-challenge.d.ts +1 -1
- package/dist/screens/phone-identifier-challenge.js.map +1 -1
- package/dist/screens/phone-identifier-enrollment.d.ts +1 -1
- package/dist/screens/phone-identifier-enrollment.js.map +1 -1
- package/dist/screens/redeem-ticket.d.ts +1 -1
- package/dist/screens/redeem-ticket.js.map +1 -1
- package/dist/screens/reset-password-email.d.ts +1 -1
- package/dist/screens/reset-password-email.js.map +1 -1
- package/dist/screens/reset-password-error.d.ts +1 -1
- package/dist/screens/reset-password-error.js.map +1 -1
- package/dist/screens/reset-password-mfa-email-challenge.d.ts +1 -1
- package/dist/screens/reset-password-mfa-email-challenge.js.map +1 -1
- package/dist/screens/reset-password-mfa-otp-challenge.d.ts +1 -1
- package/dist/screens/reset-password-mfa-otp-challenge.js.map +1 -1
- package/dist/screens/reset-password-mfa-phone-challenge.d.ts +1 -1
- package/dist/screens/reset-password-mfa-phone-challenge.js.map +1 -1
- package/dist/screens/reset-password-mfa-push-challenge-push.d.ts +1 -1
- package/dist/screens/reset-password-mfa-push-challenge-push.js.map +1 -1
- package/dist/screens/reset-password-mfa-recovery-code-challenge.d.ts +1 -1
- package/dist/screens/reset-password-mfa-recovery-code-challenge.js.map +1 -1
- package/dist/screens/reset-password-mfa-sms-challenge.d.ts +1 -1
- package/dist/screens/reset-password-mfa-sms-challenge.js.map +1 -1
- package/dist/screens/reset-password-mfa-voice-challenge.d.ts +1 -1
- package/dist/screens/reset-password-mfa-voice-challenge.js.map +1 -1
- package/dist/screens/reset-password-mfa-webauthn-platform-challenge.d.ts +1 -1
- package/dist/screens/reset-password-mfa-webauthn-platform-challenge.js.map +1 -1
- package/dist/screens/reset-password-mfa-webauthn-roaming-challenge.d.ts +1 -1
- package/dist/screens/reset-password-mfa-webauthn-roaming-challenge.js.map +1 -1
- package/dist/screens/reset-password-request.d.ts +1 -1
- package/dist/screens/reset-password-request.js.map +1 -1
- package/dist/screens/reset-password-success.d.ts +1 -1
- package/dist/screens/reset-password-success.js.map +1 -1
- package/dist/screens/reset-password.d.ts +1 -1
- package/dist/screens/reset-password.js.map +1 -1
- package/dist/screens/signup-id.d.ts +1 -1
- package/dist/screens/signup-id.js.map +1 -1
- package/dist/screens/signup-password.d.ts +1 -1
- package/dist/screens/signup-password.js.map +1 -1
- package/dist/screens/signup.d.ts +1 -1
- package/dist/screens/signup.js.map +1 -1
- package/dist/state/error-store.d.ts +11 -11
- package/dist/state/error-store.js +1 -1
- package/dist/state/error-store.js.map +1 -1
- package/dist/telemetry.js +1 -1
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -127,7 +127,7 @@ import type {
|
|
|
127
127
|
// ...other types
|
|
128
128
|
} from '@auth0/auth0-acul-react/types';
|
|
129
129
|
```
|
|
130
|
-
Refer to our [API Reference](
|
|
130
|
+
Refer to our [API Reference](#api-reference) for the full list of available types and interfaces.
|
|
131
131
|
|
|
132
132
|
---
|
|
133
133
|
|
|
@@ -137,88 +137,88 @@ Refer to our [API Reference](#-api-reference) for the full list of available typ
|
|
|
137
137
|
|
|
138
138
|
| No. | Prompt | Screen Name | Documentation Link |
|
|
139
139
|
|--------|--------------------|-------------------|--------------------------------------------------------------------------------------------|
|
|
140
|
-
| 1 | login | login | [Link](https://
|
|
141
|
-
| 2 |
|
|
142
|
-
| 3 | login-password | login-password | [Link](https://
|
|
143
|
-
| 4 | signup-id | signup-id | [Link](https://
|
|
144
|
-
| 5 | signup-password | signup-password | [Link](https://
|
|
140
|
+
| 1 | login | login | [Link](https://auth0.github.io/universal-login/auth0-acul-react/modules/Screens.login.html) |
|
|
141
|
+
| 2 | login-id | login-id | [Link](https://auth0.github.io/universal-login/auth0-acul-react/modules/Screens.login-id.html) |
|
|
142
|
+
| 3 | login-password | login-password | [Link](https://auth0.github.io/universal-login/auth0-acul-react/modules/Screens.login-password.html) |
|
|
143
|
+
| 4 | signup-id | signup-id | [Link](https://auth0.github.io/universal-login/auth0-acul-react/modules/Screens.signup-id.html) |
|
|
144
|
+
| 5 | signup-password | signup-password | [Link](https://auth0.github.io/universal-login/auth0-acul-react/modules/Screens.signup-password.html) |
|
|
145
145
|
|
|
146
146
|
<details>
|
|
147
147
|
<summary>Explore more screens...</summary>
|
|
148
148
|
|
|
149
149
|
| No. | Prompt | Screen Name | Documentation Link |
|
|
150
150
|
|--------|--------------------------------|-------------------------------------------|-------------------------------------------------------------------------------------------------------|
|
|
151
|
-
| 6 | login-passwordless | login-passwordless-email-code | [Link](https://
|
|
152
|
-
| 7 | login-passwordless | login-passwordless-sms-otp | [Link](https://
|
|
153
|
-
| 8 | passkeys | passkey-enrollment | [Link](https://
|
|
154
|
-
| 9 | passkeys | passkey-enrollment-local | [Link](https://
|
|
155
|
-
| 10 | phone-identifier-enrollment | phone-identifier-enrollment | [Link](https://
|
|
156
|
-
| 11 | phone-identifier-challenge | phone-identifier-challenge | [Link](https://
|
|
157
|
-
| 12 | email-identifier-challenge | email-identifier-challenge | [Link](https://
|
|
158
|
-
| 13 | captcha | interstitial-captcha | [Link](https://
|
|
159
|
-
| 14 | reset-password | reset-password-email | [Link](https://
|
|
160
|
-
| 15 | reset-password | reset-password-request | [Link](https://
|
|
161
|
-
| 16 | reset-password | reset-password | [Link](https://
|
|
162
|
-
| 17 | reset-password | reset-password-error | [Link](https://
|
|
163
|
-
| 18 | reset-password | reset-password-success | [Link](https://
|
|
164
|
-
| 19 | signup | signup | [Link](https://
|
|
165
|
-
| 20 | mfa | mfa-detect-browser-capabilities | [Link](https://
|
|
166
|
-
| 21 | mfa | mfa-enroll-result | [Link](https://
|
|
167
|
-
| 22 | mfa | mfa-begin-enroll-options | [Link](https://
|
|
168
|
-
| 23 | mfa | mfa-login-options | [Link](https://
|
|
169
|
-
| 24 | mfa-push | mfa-push-enrollment-qr | [Link](https://
|
|
170
|
-
| 25 | mfa-push | mfa-push-welcome | [Link](https://
|
|
171
|
-
| 26 | mfa-push | mfa-push-challenge-push | [Link](https://
|
|
172
|
-
| 27 | mfa-push | mfa-push-list | [Link](https://
|
|
173
|
-
| 28 | mfa-sms | mfa-country-codes | [Link](https://
|
|
174
|
-
| 29 | mfa-sms | mfa-sms-challenge | [Link](https://
|
|
175
|
-
| 30 | mfa-sms | mfa-sms-enrollment | [Link](https://
|
|
176
|
-
| 31 | mfa-sms | mfa-sms-list | [Link](https://
|
|
177
|
-
| 32 | mfa-email | mfa-email-challenge | [Link](https://
|
|
178
|
-
| 33 | mfa-email | mfa-email-list | [Link](https://
|
|
179
|
-
| 34 | invitatino | accept-invitation | [Link](https://
|
|
180
|
-
| 35 | organizations | organization-picker | [Link](https://
|
|
181
|
-
| 36 | organizations | organization-selection | [Link](https://
|
|
182
|
-
| 37 | reset-password | mfa-otp-challenge | [Link](https://
|
|
183
|
-
| 38 | mfa-otp | mfa-otp-enrollment-code | [Link](https://
|
|
184
|
-
| 39 | mfa-otp | mfa-otp-enrollment-qr | [Link](https://
|
|
185
|
-
| 40 | reset-password | reset-password-mfa-email-challenge | [Link](https://
|
|
186
|
-
| 41 | reset-password | reset-password-mfa-push-challenge-push | [Link](https://
|
|
187
|
-
| 42 | reset-password | mfa-sms-challenge | [Link](https://
|
|
188
|
-
| 43 | reset-password | reset-password-mfa-otp-challenge | [Link](https://
|
|
189
|
-
| 44 | mfa-phone | mfa-phone-enrollment | [Link](https://
|
|
190
|
-
| 45 | mfa-voice | mfa-voice-enrollment | [Link](https://
|
|
191
|
-
| 46 | mfa-recovery-code | mfa-recovery-code-challenge | [Link](https://
|
|
192
|
-
| 47 | device-flow | device-code-activation-allowed | [Link](https://
|
|
193
|
-
| 48 | device-flow | device-code-activation-denied | [Link](https://
|
|
194
|
-
| 49 | device-flow | device-code-activation | [Link](https://
|
|
195
|
-
| 50 | reset-password | reset-password-mfa-recovery-code-challenge | [Link](https://auth0.github.io/
|
|
196
|
-
| 51 | reset-password | reset-password-mfa-voice | [Link](https://
|
|
197
|
-
| 52 | common | redeem-ticket | [Link](https://
|
|
198
|
-
| 53 | device-flow | device-code-confirmation | [Link](https://
|
|
199
|
-
| 54 | mfa-phone | mfa-phone-challenge | [Link](https://
|
|
200
|
-
| 55 | mfa-voice | mfa-voice-challenge | [Link](https://
|
|
201
|
-
| 56 | mfa-recovery-code | mfa-recovery-code-enrollment | [Link](https://
|
|
202
|
-
| 57 | reset-password | reset-password-mfa-phone-challenge | [Link](https://
|
|
203
|
-
| 58 | mfa-recovery-code | mfa-recovery-code-challenge-new-code | [Link](https://
|
|
204
|
-
| 59 | logout | logout | [Link](https://
|
|
205
|
-
| 60 | logout | logout-aborted | [Link](https://
|
|
206
|
-
| 61 | logout | logout-complete | [Link](https://
|
|
207
|
-
| 62 | email-verification | email-verification-result | [Link](https://
|
|
208
|
-
| 63 | login-email-verification | login-email-verification | [Link](https://
|
|
209
|
-
| 64 |mfa-webauthn | mfa-webauthn-platform-enrollment | [Link](https://
|
|
210
|
-
| 65 |mfa-webauthn | mfa-webauthn-error | [Link](https://
|
|
211
|
-
| 66 |mfa-webauthn | mfa-webauthn-roaming-enrollment | [Link](https://
|
|
212
|
-
| 67 |mfa-webauthn | mfa-webauthn-roaming-challenge | [Link](https://
|
|
213
|
-
| 68 |mfa-webauthn | mfa-webauthn-platform-challenge | [Link](https://
|
|
214
|
-
| 69 |mfa-webauthn | mfa-webauthn-enrollment-success | [Link](https://
|
|
215
|
-
| 70 |mfa-webauthn | mfa-webauthn-change-key-nickname | [Link](https://
|
|
216
|
-
| 71 |mfa-webauthn | mfa-webauthn-not-available-error | [Link](https://
|
|
217
|
-
| 72 |reset-password | reset-password-mfa-webauthn-platform-challenge | [Link](https://
|
|
218
|
-
| 73 |reset-password | reset-password-mfa-webauthn-roaming-challenge | [Link](https://
|
|
219
|
-
| 74 |consent | consent | [Link](https://
|
|
220
|
-
| 75 |customized-consent | customized-consent | [Link](https://
|
|
221
|
-
| 76 |email-otp-challenge | email-otp-challenge | [Link](https://
|
|
151
|
+
| 6 | login-passwordless | login-passwordless-email-code | [Link](https://auth0.github.io/universal-login/auth0-acul-react/modules/Screens.login-passwordless-email-code.html) |
|
|
152
|
+
| 7 | login-passwordless | login-passwordless-sms-otp | [Link](https://auth0.github.io/universal-login/auth0-acul-react/modules/Screens.login-passwordless-sms-otp.html) |
|
|
153
|
+
| 8 | passkeys | passkey-enrollment | [Link](https://auth0.github.io/universal-login/auth0-acul-react/modules/Screens.passkey-enrollment.html) |
|
|
154
|
+
| 9 | passkeys | passkey-enrollment-local | [Link](https://auth0.github.io/universal-login/auth0-acul-react/modules/Screens.passkey-enrollment-local.html) |
|
|
155
|
+
| 10 | phone-identifier-enrollment | phone-identifier-enrollment | [Link](https://auth0.github.io/universal-login/auth0-acul-react/modules/Screens.phone-identifier-enrollment.html) |
|
|
156
|
+
| 11 | phone-identifier-challenge | phone-identifier-challenge | [Link](https://auth0.github.io/universal-login/auth0-acul-react/modules/Screens.phone-identifier-challenge.html) |
|
|
157
|
+
| 12 | email-identifier-challenge | email-identifier-challenge | [Link](https://auth0.github.io/universal-login/auth0-acul-react/modules/Screens.email-identifier-challenge.html) |
|
|
158
|
+
| 13 | captcha | interstitial-captcha | [Link](https://auth0.github.io/universal-login/auth0-acul-react/modules/Screens.interstitial-captcha.html) |
|
|
159
|
+
| 14 | reset-password | reset-password-email | [Link](https://auth0.github.io/universal-login/auth0-acul-react/modules/Screens.reset-password-email.html) |
|
|
160
|
+
| 15 | reset-password | reset-password-request | [Link](https://auth0.github.io/universal-login/auth0-acul-react/modules/Screens.reset-password-request.html) |
|
|
161
|
+
| 16 | reset-password | reset-password | [Link](https://auth0.github.io/universal-login/auth0-acul-react/modules/Screens.reset-password.html) |
|
|
162
|
+
| 17 | reset-password | reset-password-error | [Link](https://auth0.github.io/universal-login/auth0-acul-react/modules/Screens.reset-password-error.html) |
|
|
163
|
+
| 18 | reset-password | reset-password-success | [Link](https://auth0.github.io/universal-login/auth0-acul-react/modules/Screens.reset-password-success.html) |
|
|
164
|
+
| 19 | signup | signup | [Link](https://auth0.github.io/universal-login/auth0-acul-react/modules/Screens.signup.html) |
|
|
165
|
+
| 20 | mfa | mfa-detect-browser-capabilities | [Link](https://auth0.github.io/universal-login/auth0-acul-react/modules/Screens.mfa-detect-browser-capabilities.html) |
|
|
166
|
+
| 21 | mfa | mfa-enroll-result | [Link](https://auth0.github.io/universal-login/auth0-acul-react/modules/Screens.mfa-enroll-result.html) |
|
|
167
|
+
| 22 | mfa | mfa-begin-enroll-options | [Link](https://auth0.github.io/universal-login/auth0-acul-react/modules/Screens.mfa-begin-enroll-options.html) |
|
|
168
|
+
| 23 | mfa | mfa-login-options | [Link](https://auth0.github.io/universal-login/auth0-acul-react/modules/Screens.mfa-login-options.html) |
|
|
169
|
+
| 24 | mfa-push | mfa-push-enrollment-qr | [Link](https://auth0.github.io/universal-login/auth0-acul-react/modules/Screens.mfa-push-enrollment-qr.html) |
|
|
170
|
+
| 25 | mfa-push | mfa-push-welcome | [Link](https://auth0.github.io/universal-login/auth0-acul-react/modules/Screens.mfa-push-welcome.html) |
|
|
171
|
+
| 26 | mfa-push | mfa-push-challenge-push | [Link](https://auth0.github.io/universal-login/auth0-acul-react/modules/Screens.mfa-push-challenge-push.html) |
|
|
172
|
+
| 27 | mfa-push | mfa-push-list | [Link](https://auth0.github.io/universal-login/auth0-acul-react/modules/Screens.mfa-push-list.html) |
|
|
173
|
+
| 28 | mfa-sms | mfa-country-codes | [Link](https://auth0.github.io/universal-login/auth0-acul-react/modules/Screens.mfa-country-codes.html) |
|
|
174
|
+
| 29 | mfa-sms | mfa-sms-challenge | [Link](https://auth0.github.io/universal-login/auth0-acul-react/modules/Screens.mfa-sms-challenge.html) |
|
|
175
|
+
| 30 | mfa-sms | mfa-sms-enrollment | [Link](https://auth0.github.io/universal-login/auth0-acul-react/modules/Screens.mfa-sms-enrollment.html) |
|
|
176
|
+
| 31 | mfa-sms | mfa-sms-list | [Link](https://auth0.github.io/universal-login/auth0-acul-react/modules/Screens.mfa-sms-list.html) |
|
|
177
|
+
| 32 | mfa-email | mfa-email-challenge | [Link](https://auth0.github.io/universal-login/auth0-acul-react/modules/Screens.mfa-email-challenge.html) |
|
|
178
|
+
| 33 | mfa-email | mfa-email-list | [Link](https://auth0.github.io/universal-login/auth0-acul-react/modules/Screens.mfa-email-list.html) |
|
|
179
|
+
| 34 | invitatino | accept-invitation | [Link](https://auth0.github.io/universal-login/auth0-acul-react/modules/Screens.accept-invitation.html) |
|
|
180
|
+
| 35 | organizations | organization-picker | [Link](https://auth0.github.io/universal-login/auth0-acul-react/modules/Screens.organization-picker.html) |
|
|
181
|
+
| 36 | organizations | organization-selection | [Link](https://auth0.github.io/universal-login/auth0-acul-react/modules/Screens.organization-selection.html) |
|
|
182
|
+
| 37 | reset-password | mfa-otp-challenge | [Link](https://auth0.github.io/universal-login/auth0-acul-react/modules/Screens.mfa-otp-challenge.html) |
|
|
183
|
+
| 38 | mfa-otp | mfa-otp-enrollment-code | [Link](https://auth0.github.io/universal-login/auth0-acul-react/modules/Screens.mfa-otp-enrollment-code.html) |
|
|
184
|
+
| 39 | mfa-otp | mfa-otp-enrollment-qr | [Link](https://auth0.github.io/universal-login/auth0-acul-react/modules/Screens.mfa-otp-enrollment-qr.html) |
|
|
185
|
+
| 40 | reset-password | reset-password-mfa-email-challenge | [Link](https://auth0.github.io/universal-login/auth0-acul-react/modules/Screens.reset-password-mfa-email-challenge.html) |
|
|
186
|
+
| 41 | reset-password | reset-password-mfa-push-challenge-push | [Link](https://auth0.github.io/universal-login/auth0-acul-react/modules/Screens.reset-password-mfa-push-challenge-push.html)|
|
|
187
|
+
| 42 | reset-password | mfa-sms-challenge | [Link](https://auth0.github.io/universal-login/auth0-acul-react/modules/Screens.reset-password-mfa-sms-challenge.html) |
|
|
188
|
+
| 43 | reset-password | reset-password-mfa-otp-challenge | [Link](https://auth0.github.io/universal-login/auth0-acul-react/modules/Screens.organization-selection.html) |
|
|
189
|
+
| 44 | mfa-phone | mfa-phone-enrollment | [Link](https://auth0.github.io/universal-login/auth0-acul-react/modules/Screens.mfa-phone-enrollment.html) |
|
|
190
|
+
| 45 | mfa-voice | mfa-voice-enrollment | [Link](https://auth0.github.io/universal-login/auth0-acul-react/modules/Screens.mfa-voice-enrollment.html) |
|
|
191
|
+
| 46 | mfa-recovery-code | mfa-recovery-code-challenge | [Link](https://auth0.github.io/universal-login/auth0-acul-react/modules/Screens.mfa-recovery-code-challenge.html) |
|
|
192
|
+
| 47 | device-flow | device-code-activation-allowed | [Link](https://auth0.github.io/universal-login/auth0-acul-react/modules/Screens.device-code-activation-allowed.html) |
|
|
193
|
+
| 48 | device-flow | device-code-activation-denied | [Link](https://auth0.github.io/universal-login/auth0-acul-react/modules/Screens.device-code-activation-denied.html) |
|
|
194
|
+
| 49 | device-flow | device-code-activation | [Link](https://auth0.github.io/universal-login/auth0-acul-react/modules/Screens.device-code-activation.html) |
|
|
195
|
+
| 50 | reset-password | reset-password-mfa-recovery-code-challenge | [Link](https://auth0.github.io/universal-login/auth0-acul-react/modules/Screens.reset-password-mfa-recovery-code-challenge.html) |
|
|
196
|
+
| 51 | reset-password | reset-password-mfa-voice | [Link](https://auth0.github.io/universal-login/auth0-acul-react/modules/Screens.reset-password-mfa-voice-challenge.html) |
|
|
197
|
+
| 52 | common | redeem-ticket | [Link](https://auth0.github.io/universal-login/auth0-acul-react/modules/Screens.redeem-ticket.html) |
|
|
198
|
+
| 53 | device-flow | device-code-confirmation | [Link](https://auth0.github.io/universal-login/auth0-acul-react/modules/Screens.device-code-confirmation.html) |
|
|
199
|
+
| 54 | mfa-phone | mfa-phone-challenge | [Link](https://auth0.github.io/universal-login/auth0-acul-react/modules/Screens.mfa-phone-challenge.html) |
|
|
200
|
+
| 55 | mfa-voice | mfa-voice-challenge | [Link](https://auth0.github.io/universal-login/auth0-acul-react/modules/Screens.mfa-voice-challenge.html) |
|
|
201
|
+
| 56 | mfa-recovery-code | mfa-recovery-code-enrollment | [Link](https://auth0.github.io/universal-login/auth0-acul-react/modules/Screens.mfa-recovery-code-enrollment.html) |
|
|
202
|
+
| 57 | reset-password | reset-password-mfa-phone-challenge | [Link](https://auth0.github.io/universal-login/auth0-acul-react/modules/Screens.reset-password-mfa-phone-challenge.html) |
|
|
203
|
+
| 58 | mfa-recovery-code | mfa-recovery-code-challenge-new-code | [Link](https://auth0.github.io/universal-login/auth0-acul-react/modules/Screens.mfa-recovery-code-challenge-new-code.html) |
|
|
204
|
+
| 59 | logout | logout | [Link](https://auth0.github.io/universal-login/auth0-acul-react/modules/Screens.logout.html) |
|
|
205
|
+
| 60 | logout | logout-aborted | [Link](https://auth0.github.io/universal-login/auth0-acul-react/modules/Screens.logout-aborted.html) |
|
|
206
|
+
| 61 | logout | logout-complete | [Link](https://auth0.github.io/universal-login/auth0-acul-react/modules/Screens.logout-complete.html) |
|
|
207
|
+
| 62 | email-verification | email-verification-result | [Link](https://auth0.github.io/universal-login/auth0-acul-react/modules/Screens.email-verification-result.html) |
|
|
208
|
+
| 63 | login-email-verification | login-email-verification | [Link](https://auth0.github.io/universal-login/auth0-acul-react/modules/Screens.login-email-verification.html) |
|
|
209
|
+
| 64 |mfa-webauthn | mfa-webauthn-platform-enrollment | [Link](https://auth0.github.io/universal-login/auth0-acul-react/modules/Screens.mfa-webauthn-platform-enrollment.html) |
|
|
210
|
+
| 65 |mfa-webauthn | mfa-webauthn-error | [Link](https://auth0.github.io/universal-login/auth0-acul-react/modules/Screens.mfa-webauthn-error.html) |
|
|
211
|
+
| 66 |mfa-webauthn | mfa-webauthn-roaming-enrollment | [Link](https://auth0.github.io/universal-login/auth0-acul-react/modules/Screens.mfa-webauthn-roaming-enrollment.html) |
|
|
212
|
+
| 67 |mfa-webauthn | mfa-webauthn-roaming-challenge | [Link](https://auth0.github.io/universal-login/auth0-acul-react/modules/Screens.mfa-webauthn-roaming-challenge.html) |
|
|
213
|
+
| 68 |mfa-webauthn | mfa-webauthn-platform-challenge | [Link](https://auth0.github.io/universal-login/auth0-acul-react/modules/Screens.mfa-webauthn-platform-challenge.html) |
|
|
214
|
+
| 69 |mfa-webauthn | mfa-webauthn-enrollment-success | [Link](https://auth0.github.io/universal-login/auth0-acul-react/modules/Screens.mfa-webauthn-enrollment-success.html) |
|
|
215
|
+
| 70 |mfa-webauthn | mfa-webauthn-change-key-nickname | [Link](https://auth0.github.io/universal-login/auth0-acul-react/modules/Screens.mfa-webauthn-change-key-nickname.html) |
|
|
216
|
+
| 71 |mfa-webauthn | mfa-webauthn-not-available-error | [Link](https://auth0.github.io/universal-login/auth0-acul-react/modules/screens.mfa-webauthn-not-available-error.html) |
|
|
217
|
+
| 72 |reset-password | reset-password-mfa-webauthn-platform-challenge | [Link](https://auth0.github.io/universal-login/auth0-acul-react/modules/Screens.reset-password-mfa-webauthn-platform-challenge.html) |
|
|
218
|
+
| 73 |reset-password | reset-password-mfa-webauthn-roaming-challenge | [Link](https://auth0.github.io/universal-login/auth0-acul-react/modules/Screens.reset-password-mfa-webauthn-roaming-challenge.html) |
|
|
219
|
+
| 74 |consent | consent | [Link](https://auth0.github.io/universal-login/auth0-acul-react/modules/Screens.consent.html) |
|
|
220
|
+
| 75 |customized-consent | customized-consent | [Link](https://auth0.github.io/universal-login/auth0-acul-react/modules/Screens.customized-consent.html) |
|
|
221
|
+
| 76 |email-otp-challenge | email-otp-challenge | [Link](https://auth0.github.io/universal-login/auth0-acul-react/modules/Screens.email-otp-challenge.html) |
|
|
222
222
|
</details>
|
|
223
223
|
|
|
224
224
|
---
|
|
@@ -208,7 +208,7 @@
|
|
|
208
208
|
*
|
|
209
209
|
* #### Error Handling
|
|
210
210
|
* - `useErrors(options)` - Comprehensive error management with categorization
|
|
211
|
-
* - Filter by error
|
|
211
|
+
* - Filter by error type: `'validation'`, `'auth0'`, `'configuration'`
|
|
212
212
|
* - Filter by field name for form-specific errors
|
|
213
213
|
* - Dismiss individual or all errors
|
|
214
214
|
*
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { type ErrorItem, type
|
|
1
|
+
import { type ErrorItem, type ErrorType } from '../../state/error-store';
|
|
2
2
|
export interface ErrorsResult extends ReadonlyArray<ErrorItem> {
|
|
3
|
-
|
|
3
|
+
byType(type: ErrorType, opts?: {
|
|
4
4
|
field?: string;
|
|
5
5
|
}): ReadonlyArray<ErrorItem>;
|
|
6
6
|
byField(field: string, opts?: {
|
|
7
|
-
|
|
7
|
+
type?: ErrorType;
|
|
8
8
|
}): ReadonlyArray<ErrorItem>;
|
|
9
9
|
}
|
|
10
10
|
export interface UseErrorOptions {
|
|
@@ -18,7 +18,7 @@ export interface UseErrorsResult {
|
|
|
18
18
|
}
|
|
19
19
|
/**
|
|
20
20
|
* React hook for reading and managing errors in ACUL (Advanced Customization of Universal Login).
|
|
21
|
-
* With all validation and server-side errors. It groups errors into three
|
|
21
|
+
* With all validation and server-side errors. It groups errors into three types:
|
|
22
22
|
* - `auth0` — errors returned by Auth0 or your own backend.
|
|
23
23
|
* - `validation` — errors from client-side validation (e.g., invalid form input).
|
|
24
24
|
* - `configuration` — errors caused by incorrect integration or SDK misuse.
|
|
@@ -31,8 +31,8 @@ export interface UseErrorsResult {
|
|
|
31
31
|
*
|
|
32
32
|
* @returns An object of type {@link UseErrorsResult}, containing:
|
|
33
33
|
* - `errors` — the full error list of type {@link ErrorsResult}, with helpers:
|
|
34
|
-
* - `errors.
|
|
35
|
-
* - `errors.byField(field, filter?)` — filter by field and optionally by
|
|
34
|
+
* - `errors.byType(type, filter?)` — filter by error type and optionally by field.
|
|
35
|
+
* - `errors.byField(field, filter?)` — filter by field and optionally by type.
|
|
36
36
|
* - `hasError` — `true` if any error is currently present.
|
|
37
37
|
* - `dismiss(id)` — remove a specific error by its ID.
|
|
38
38
|
* - `dismissAll()` — clear all tracked errors.
|
|
@@ -51,7 +51,7 @@ export interface UseErrorsResult {
|
|
|
51
51
|
* <div>
|
|
52
52
|
* {hasError && (
|
|
53
53
|
* <div className="mb-4">
|
|
54
|
-
* {errors.
|
|
54
|
+
* {errors.byType("auth0").map(err => (
|
|
55
55
|
* <div key={err.id} className="text-red-600">
|
|
56
56
|
* {err.message}
|
|
57
57
|
* <button onClick={() => dismiss(err.id)}>Dismiss</button>
|
|
@@ -66,12 +66,12 @@ export interface UseErrorsResult {
|
|
|
66
66
|
* }
|
|
67
67
|
* ```
|
|
68
68
|
*
|
|
69
|
-
* In addition to rendering messages, you can filter by field or
|
|
69
|
+
* In addition to rendering messages, you can filter by field or type:
|
|
70
70
|
* ```ts
|
|
71
|
-
* console.log(errors.
|
|
72
|
-
* console.log(errors.
|
|
71
|
+
* console.log(errors.byType('validation')); // all validation errors
|
|
72
|
+
* console.log(errors.byType('validation', { field: 'username' })); // validation errors for field 'username'
|
|
73
73
|
* console.log(errors.byField('username')); // all errors for field 'username'
|
|
74
|
-
* console.log(errors.byField('username', {
|
|
74
|
+
* console.log(errors.byField('username', { type: 'auth0' })); // auth0 errors for field 'username'
|
|
75
75
|
* ```
|
|
76
76
|
*/
|
|
77
77
|
export declare function useErrors(options?: UseErrorOptions): UseErrorsResult;
|
|
@@ -100,4 +100,4 @@ export declare const errorManager: {
|
|
|
100
100
|
pushServerErrors(list: Omit<ErrorItem, "id"> | Array<Omit<ErrorItem, "id">>): void;
|
|
101
101
|
syncServerErrors(): void;
|
|
102
102
|
};
|
|
103
|
-
export { ErrorItem,
|
|
103
|
+
export { ErrorItem, ErrorType };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{getErrors as r,ValidationError as e,ConfigurationError as t,Auth0Error as a}from"@auth0/auth0-acul-js";import{useSyncExternalStore as
|
|
1
|
+
import{getErrors as r,ValidationError as e,ConfigurationError as t,Auth0Error as a}from"@auth0/auth0-acul-js";import{useSyncExternalStore as o,useRef as n,useEffect as i,useMemo as c,useCallback as l}from"react";import{errorStore as s,ERROR_TYPES as u}from"../../state/error-store.js";function f(r,e){return e?r.filter(r=>r.field===e):r}const p=new WeakMap,d=new WeakMap,h=new WeakMap,v=(r,e)=>{const t="auth0"===r?p:"validation"===r?d:h,a=t.get(e);if(a)return a;const o=Object.freeze(e.map(e=>Object.freeze({...e,type:r})));return t.set(e,o),o};function b(e={}){const{includeDevErrors:t=!1}=e,a=o(r=>s.subscribe(r),()=>s.snapshot()),p=n(!1);i(()=>{if(p.current)return;p.current=!0;const e=r?.()??[];s.replace("auth0",e)},[]);const d=c(()=>v("auth0",a.auth0),[a.auth0]),h=c(()=>v("validation",a.validation),[a.validation]),b=c(()=>v("configuration",a.configuration),[a.configuration]),y=c(()=>Object.freeze([...t?b:[],...h,...d]),[t,b,h,d]),E=c(()=>{const r=Object.assign([...y],{byType(r,e){let t;return t="validation"===r?h:"configuration"===r?b:d,e?.field?Object.freeze(f(t,e.field)):t},byField:(e,t)=>t?.type?r.byType(t.type,{field:e}):Object.freeze(f(y,e))});return Object.freeze(r)},[y,h,b,d]),g=y.length>0,m=l(r=>{s.remove(u,r)},[]),w=l(()=>{s.clear(u)},[]);return c(()=>({errors:E,hasError:g,dismiss:m,dismissAll:w}),[E,g,m,w])}const y={withError:function(r){const o=r=>{const o=function(r){return r instanceof e?"validation":r instanceof t?"configuration":r instanceof a?"auth0":null}(r),n=function(r){return{code:r?.code??(r instanceof Error?r.name:void 0)??"unknown_error",message:r?.message??"Unknown error",field:r?.field}}(r);switch(o){case"validation":y.replaceValidationErrors([n]);break;case"configuration":y.replaceDeveloperErrors([n]);break;case"auth0":y.replaceServerErrors([n]);break;default:throw console.error("[auth0-acul-react] Unhandled error:",r),r}};if("function"==typeof r)try{const e=r();return"object"==typeof(n=e)&&null!==n&&"then"in n&&"function"==typeof n.then?e.catch(r=>{throw o(r),r}):e}catch(r){throw o(r),r}var n;return r.catch(r=>{throw o(r),r})},replaceValidationErrors(r,e){e?.byField?s.replacePartial("validation",r,e.byField):s.replace("validation",r)},clearValidationErrors(){s.clear(["validation"])},pushValidationErrors(r){s.push("validation",r)},replaceDeveloperErrors(r,e){e?.byField?s.replacePartial("configuration",r,e.byField):s.replace("configuration",r)},clearDeveloperErrors(){s.clear(["configuration"])},pushDeveloperErrors(r){s.push("configuration",r)},replaceServerErrors(r,e){e?.byField?s.replacePartial("auth0",r,e.byField):s.replace("auth0",r)},clearServerErrors(){s.clear(["auth0"])},pushServerErrors(r){s.push("auth0",r)},syncServerErrors(){const e=r?.()??[];s.replace("auth0",e)}};export{y as errorManager,b as useErrors};
|
|
2
2
|
//# sourceMappingURL=errors.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"errors.js","sources":["../../../src/hooks/common/errors.ts"],"sourcesContent":["import {\n ConfigurationError,\n ValidationError,\n Auth0Error as Auth0ServerError,\n getErrors as getServerErrors,\n type Error as Auth0Error,\n} from '@auth0/auth0-acul-js';\nimport { useEffect, useMemo, useRef, useSyncExternalStore, useCallback } from 'react';\n\nimport { errorStore, ERROR_KINDS, type ErrorItem, type ErrorKind } from '../../state/error-store';\n\nexport interface ErrorsResult extends ReadonlyArray<ErrorItem> {\n byKind(kind: ErrorKind, opts?: { field?: string }): ReadonlyArray<ErrorItem>;\n byField(field: string, opts?: { kind?: ErrorKind }): ReadonlyArray<ErrorItem>;\n}\n\nexport interface UseErrorOptions {\n includeDevErrors?: boolean;\n}\n\nexport interface UseErrorsResult {\n errors: ErrorsResult;\n hasError: boolean;\n dismiss: (id: string) => void;\n dismissAll: () => void;\n}\n\nfunction classifyKind(e: unknown): ErrorKind | null {\n if (e instanceof ValidationError) {\n return 'validation';\n }\n if (e instanceof ConfigurationError) {\n return 'configuration';\n }\n if (e instanceof Auth0ServerError) {\n return 'auth0';\n }\n return null;\n}\n\nfunction toErrorObject(e: unknown): Omit<ErrorItem, 'id'> {\n return {\n code: (e as Auth0Error)?.code ?? (e instanceof Error ? e.name : undefined) ?? 'unknown_error',\n message: (e as Auth0Error)?.message ?? 'Unknown error',\n field: (e as Auth0Error)?.field,\n };\n}\n\nfunction filterByField<T extends { field?: string }>(\n list: ReadonlyArray<T>,\n field?: string\n): ReadonlyArray<T> {\n if (!field) {\n return list;\n }\n return list.filter((e) => e.field === field);\n}\n\n// caches for tagging\nconst cacheServer = new WeakMap<ReadonlyArray<ErrorItem>, ReadonlyArray<ErrorItem>>();\nconst cacheValidation = new WeakMap<ReadonlyArray<ErrorItem>, ReadonlyArray<ErrorItem>>();\nconst cacheDev = new WeakMap<ReadonlyArray<ErrorItem>, ReadonlyArray<ErrorItem>>();\n\nconst tag = (kind: ErrorKind, arr: ReadonlyArray<ErrorItem>): ReadonlyArray<ErrorItem> => {\n const cache = kind === 'auth0' ? cacheServer : kind === 'validation' ? cacheValidation : cacheDev;\n const hit = cache.get(arr);\n if (hit) {\n return hit;\n }\n const out = Object.freeze(arr.map((e) => Object.freeze({ ...e, kind })));\n cache.set(arr, out);\n return out;\n};\n\n/**\n * React hook for reading and managing errors in ACUL (Advanced Customization of Universal Login).\n * With all validation and server-side errors. It groups errors into three kinds:\n * - `auth0` — errors returned by Auth0 or your own backend.\n * - `validation` — errors from client-side validation (e.g., invalid form input).\n * - `configuration` — errors caused by incorrect integration or SDK misuse.\n *\n * @supportedScreens\n * - The `useErrors` hook is available on every ACUL screen.\n *\n * @param options.includeDevErrors - When `true`, configuration errors are included in\n * the returned list. Defaults to `false`.\n *\n * @returns An object of type {@link UseErrorsResult}, containing:\n * - `errors` — the full error list of type {@link ErrorsResult}, with helpers:\n * - `errors.byKind(kind, filter?)` — filter by error kind and optionally by field.\n * - `errors.byField(field, filter?)` — filter by field and optionally by kind.\n * - `hasError` — `true` if any error is currently present.\n * - `dismiss(id)` — remove a specific error by its ID.\n * - `dismissAll()` — clear all tracked errors.\n *\n * Typical usage is inside a form or screen component where you need to\n * reactively display errors and provide ways to dismiss them:\n *\n * @example\n * ```tsx\n * import { useErrors } from \"@auth0/auth0-acul-react\";\n *\n * export function SignupForm() {\n * const { errors, hasError, dismiss, dismissAll } = useErrors();\n *\n * return (\n * <div>\n * {hasError && (\n * <div className=\"mb-4\">\n * {errors.byKind(\"auth0\").map(err => (\n * <div key={err.id} className=\"text-red-600\">\n * {err.message}\n * <button onClick={() => dismiss(err.id)}>Dismiss</button>\n * </div>\n * ))}\n * </div>\n * )}\n *\n * <button onClick={dismissAll}>Clear All Errors</button>\n * </div>\n * );\n * }\n * ```\n *\n * In addition to rendering messages, you can filter by field or kind:\n * ```ts\n * console.log(errors.byKind('validation')); // all validation errors\n * console.log(errors.byKind('validation', { field: 'username' })); // validation errors for field 'username'\n * console.log(errors.byField('username')); // all errors for field 'username'\n * console.log(errors.byField('username', { kind: 'auth0' })); // auth0 errors for field 'username'\n * ```\n */\n\nexport function useErrors(options: UseErrorOptions = {}): UseErrorsResult {\n const { includeDevErrors = false } = options;\n\n const snap = useSyncExternalStore(\n (cb) => errorStore.subscribe(cb),\n () => errorStore.snapshot()\n );\n\n const didInit = useRef(false);\n useEffect(() => {\n if (didInit.current) {\n return;\n }\n didInit.current = true;\n\n // Get server errors directly from TS SDK on first render.\n const server = (getServerErrors?.() ?? []) as Array<Omit<ErrorItem, 'id'>>;\n errorStore.replace('auth0', server);\n }, []);\n\n const serverTagged = useMemo(() => tag('auth0', snap.auth0), [snap.auth0]);\n const clientTagged = useMemo(() => tag('validation', snap.validation), [snap.validation]);\n const devTagged = useMemo(() => tag('configuration', snap.configuration), [snap.configuration]);\n\n const all = useMemo<ReadonlyArray<ErrorItem>>(\n () => Object.freeze([...(includeDevErrors ? devTagged : []), ...clientTagged, ...serverTagged]),\n [includeDevErrors, devTagged, clientTagged, serverTagged]\n );\n\n const errors: ErrorsResult = useMemo(() => {\n const arr = Object.assign([...all], {\n byKind(kind: ErrorKind, opts?: { field?: string }): ReadonlyArray<ErrorItem> {\n let base: ReadonlyArray<ErrorItem>;\n if (kind === 'validation') {\n base = clientTagged;\n } else if (kind === 'configuration') {\n base = devTagged;\n } else {\n base = serverTagged;\n }\n if (opts?.field) {\n return Object.freeze(filterByField(base, opts.field));\n }\n return base;\n },\n byField(field: string, opts?: { kind?: ErrorKind }): ReadonlyArray<ErrorItem> {\n if (opts?.kind) {\n return arr.byKind(opts.kind, { field });\n }\n return Object.freeze(filterByField(all, field));\n },\n });\n return Object.freeze(arr);\n }, [all, clientTagged, devTagged, serverTagged]);\n\n const hasError = all.length > 0;\n\n const dismiss = useCallback((id: string) => {\n errorStore.remove(ERROR_KINDS, id);\n }, []);\n\n const dismissAll = useCallback(() => {\n errorStore.clear(ERROR_KINDS);\n }, []);\n\n return useMemo(\n () => ({ errors, hasError, dismiss, dismissAll }),\n [errors, hasError, dismiss, dismissAll]\n );\n}\n\n// ---------------- INTERNAL (SDK-only) ----------------\nconst isPromise = (v: unknown): v is Promise<unknown> =>\n typeof v === 'object' &&\n v !== null &&\n 'then' in v &&\n typeof (v as { then: unknown }).then === 'function';\n\nfunction withError<T>(actionOrPromise: (() => T | Promise<T>) | Promise<T>): T | Promise<T> {\n const handle = (e: unknown) => {\n const kind = classifyKind(e);\n const normalized = toErrorObject(e);\n switch (kind) {\n case 'validation':\n errorManager.replaceValidationErrors([normalized]);\n break;\n case 'configuration':\n errorManager.replaceDeveloperErrors([normalized]);\n break;\n case 'auth0':\n errorManager.replaceServerErrors([normalized]);\n break;\n default: {\n console.error('[auth0-acul-react] Unhandled error:', e);\n throw e;\n }\n }\n };\n\n if (typeof actionOrPromise === 'function') {\n try {\n const result = (actionOrPromise as () => T | Promise<T>)();\n return isPromise(result)\n ? result.catch((e) => {\n handle(e);\n throw e;\n })\n : result;\n } catch (e) {\n handle(e);\n throw e;\n }\n }\n\n return actionOrPromise.catch((e) => {\n handle(e);\n throw e;\n });\n}\n\n/**\n * @hidden\n * Internal error manager for use by SDK methods.\n * Use the `useErrors` hook in React components instead.\n */\nexport const errorManager = {\n withError,\n\n replaceValidationErrors(list: Array<Omit<ErrorItem, 'id'>>, opts?: { byField?: string }) {\n if (opts?.byField) {\n errorStore.replacePartial('validation', list, opts.byField);\n } else {\n errorStore.replace('validation', list);\n }\n },\n clearValidationErrors() {\n errorStore.clear(['validation']);\n },\n pushValidationErrors(list: Omit<ErrorItem, 'id'> | Array<Omit<ErrorItem, 'id'>>) {\n errorStore.push('validation', list);\n },\n\n replaceDeveloperErrors(list: Array<Omit<ErrorItem, 'id'>>, opts?: { byField?: string }) {\n if (opts?.byField) {\n errorStore.replacePartial('configuration', list, opts.byField);\n } else {\n errorStore.replace('configuration', list);\n }\n },\n clearDeveloperErrors() {\n errorStore.clear(['configuration']);\n },\n pushDeveloperErrors(list: Omit<ErrorItem, 'id'> | Array<Omit<ErrorItem, 'id'>>) {\n errorStore.push('configuration', list);\n },\n\n replaceServerErrors(list: Array<Omit<ErrorItem, 'id'>>, opts?: { byField?: string }) {\n if (opts?.byField) {\n errorStore.replacePartial('auth0', list, opts.byField);\n } else {\n errorStore.replace('auth0', list);\n }\n },\n clearServerErrors() {\n errorStore.clear(['auth0']);\n },\n pushServerErrors(list: Omit<ErrorItem, 'id'> | Array<Omit<ErrorItem, 'id'>>) {\n errorStore.push('auth0', list);\n },\n\n syncServerErrors() {\n const server = (getServerErrors?.() ?? []) as Array<Omit<ErrorItem, 'id'>>;\n errorStore.replace('auth0', server);\n },\n};\n\nexport { ErrorItem, ErrorKind };\n"],"names":["filterByField","list","field","filter","e","cacheServer","WeakMap","cacheValidation","cacheDev","tag","kind","arr","cache","hit","get","out","Object","freeze","map","set","useErrors","options","includeDevErrors","snap","useSyncExternalStore","cb","errorStore","subscribe","snapshot","didInit","useRef","useEffect","current","server","getServerErrors","replace","serverTagged","useMemo","auth0","clientTagged","validation","devTagged","configuration","all","errors","assign","byKind","opts","base","byField","hasError","length","dismiss","useCallback","id","remove","ERROR_KINDS","dismissAll","clear","errorManager","withError","actionOrPromise","handle","ValidationError","ConfigurationError","Auth0ServerError","classifyKind","normalized","code","Error","name","undefined","message","toErrorObject","replaceValidationErrors","replaceDeveloperErrors","replaceServerErrors","console","error","result","v","then","catch","replacePartial","clearValidationErrors","pushValidationErrors","push","clearDeveloperErrors","pushDeveloperErrors","clearServerErrors","pushServerErrors","syncServerErrors"],"mappings":"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"}
|
|
1
|
+
{"version":3,"file":"errors.js","sources":["../../../src/hooks/common/errors.ts"],"sourcesContent":["import {\n ConfigurationError,\n ValidationError,\n Auth0Error as Auth0ServerError,\n getErrors as getServerErrors,\n type Error as Auth0Error,\n} from '@auth0/auth0-acul-js';\nimport { useEffect, useMemo, useRef, useSyncExternalStore, useCallback } from 'react';\n\nimport { errorStore, ERROR_TYPES, type ErrorItem, type ErrorType } from '../../state/error-store';\n\nexport interface ErrorsResult extends ReadonlyArray<ErrorItem> {\n byType(type: ErrorType, opts?: { field?: string }): ReadonlyArray<ErrorItem>;\n byField(field: string, opts?: { type?: ErrorType }): ReadonlyArray<ErrorItem>;\n}\n\nexport interface UseErrorOptions {\n includeDevErrors?: boolean;\n}\n\nexport interface UseErrorsResult {\n errors: ErrorsResult;\n hasError: boolean;\n dismiss: (id: string) => void;\n dismissAll: () => void;\n}\n\nfunction classifyType(e: unknown): ErrorType | null {\n if (e instanceof ValidationError) {\n return 'validation';\n }\n if (e instanceof ConfigurationError) {\n return 'configuration';\n }\n if (e instanceof Auth0ServerError) {\n return 'auth0';\n }\n return null;\n}\n\nfunction toErrorObject(e: unknown): Omit<ErrorItem, 'id'> {\n return {\n code: (e as Auth0Error)?.code ?? (e instanceof Error ? e.name : undefined) ?? 'unknown_error',\n message: (e as Auth0Error)?.message ?? 'Unknown error',\n field: (e as Auth0Error)?.field,\n };\n}\n\nfunction filterByField<T extends { field?: string }>(\n list: ReadonlyArray<T>,\n field?: string\n): ReadonlyArray<T> {\n if (!field) {\n return list;\n }\n return list.filter((e) => e.field === field);\n}\n\n// caches for tagging\nconst cacheServer = new WeakMap<ReadonlyArray<ErrorItem>, ReadonlyArray<ErrorItem>>();\nconst cacheValidation = new WeakMap<ReadonlyArray<ErrorItem>, ReadonlyArray<ErrorItem>>();\nconst cacheDev = new WeakMap<ReadonlyArray<ErrorItem>, ReadonlyArray<ErrorItem>>();\n\nconst tag = (type: ErrorType, arr: ReadonlyArray<ErrorItem>): ReadonlyArray<ErrorItem> => {\n const cache = type === 'auth0' ? cacheServer : type === 'validation' ? cacheValidation : cacheDev;\n const hit = cache.get(arr);\n if (hit) {\n return hit;\n }\n const out = Object.freeze(arr.map((e) => Object.freeze({ ...e, type })));\n cache.set(arr, out);\n return out;\n};\n\n/**\n * React hook for reading and managing errors in ACUL (Advanced Customization of Universal Login).\n * With all validation and server-side errors. It groups errors into three types:\n * - `auth0` — errors returned by Auth0 or your own backend.\n * - `validation` — errors from client-side validation (e.g., invalid form input).\n * - `configuration` — errors caused by incorrect integration or SDK misuse.\n *\n * @supportedScreens\n * - The `useErrors` hook is available on every ACUL screen.\n *\n * @param options.includeDevErrors - When `true`, configuration errors are included in\n * the returned list. Defaults to `false`.\n *\n * @returns An object of type {@link UseErrorsResult}, containing:\n * - `errors` — the full error list of type {@link ErrorsResult}, with helpers:\n * - `errors.byType(type, filter?)` — filter by error type and optionally by field.\n * - `errors.byField(field, filter?)` — filter by field and optionally by type.\n * - `hasError` — `true` if any error is currently present.\n * - `dismiss(id)` — remove a specific error by its ID.\n * - `dismissAll()` — clear all tracked errors.\n *\n * Typical usage is inside a form or screen component where you need to\n * reactively display errors and provide ways to dismiss them:\n *\n * @example\n * ```tsx\n * import { useErrors } from \"@auth0/auth0-acul-react\";\n *\n * export function SignupForm() {\n * const { errors, hasError, dismiss, dismissAll } = useErrors();\n *\n * return (\n * <div>\n * {hasError && (\n * <div className=\"mb-4\">\n * {errors.byType(\"auth0\").map(err => (\n * <div key={err.id} className=\"text-red-600\">\n * {err.message}\n * <button onClick={() => dismiss(err.id)}>Dismiss</button>\n * </div>\n * ))}\n * </div>\n * )}\n *\n * <button onClick={dismissAll}>Clear All Errors</button>\n * </div>\n * );\n * }\n * ```\n *\n * In addition to rendering messages, you can filter by field or type:\n * ```ts\n * console.log(errors.byType('validation')); // all validation errors\n * console.log(errors.byType('validation', { field: 'username' })); // validation errors for field 'username'\n * console.log(errors.byField('username')); // all errors for field 'username'\n * console.log(errors.byField('username', { type: 'auth0' })); // auth0 errors for field 'username'\n * ```\n */\n\nexport function useErrors(options: UseErrorOptions = {}): UseErrorsResult {\n const { includeDevErrors = false } = options;\n\n const snap = useSyncExternalStore(\n (cb) => errorStore.subscribe(cb),\n () => errorStore.snapshot()\n );\n\n const didInit = useRef(false);\n useEffect(() => {\n if (didInit.current) {\n return;\n }\n didInit.current = true;\n\n // Get server errors directly from TS SDK on first render.\n const server = (getServerErrors?.() ?? []) as Array<Omit<ErrorItem, 'id'>>;\n errorStore.replace('auth0', server);\n }, []);\n\n const serverTagged = useMemo(() => tag('auth0', snap.auth0), [snap.auth0]);\n const clientTagged = useMemo(() => tag('validation', snap.validation), [snap.validation]);\n const devTagged = useMemo(() => tag('configuration', snap.configuration), [snap.configuration]);\n\n const all = useMemo<ReadonlyArray<ErrorItem>>(\n () => Object.freeze([...(includeDevErrors ? devTagged : []), ...clientTagged, ...serverTagged]),\n [includeDevErrors, devTagged, clientTagged, serverTagged]\n );\n\n const errors: ErrorsResult = useMemo(() => {\n const arr = Object.assign([...all], {\n byType(type: ErrorType, opts?: { field?: string }): ReadonlyArray<ErrorItem> {\n let base: ReadonlyArray<ErrorItem>;\n if (type === 'validation') {\n base = clientTagged;\n } else if (type === 'configuration') {\n base = devTagged;\n } else {\n base = serverTagged;\n }\n if (opts?.field) {\n return Object.freeze(filterByField(base, opts.field));\n }\n return base;\n },\n byField(field: string, opts?: { type?: ErrorType }): ReadonlyArray<ErrorItem> {\n if (opts?.type) {\n return arr.byType(opts.type, { field });\n }\n return Object.freeze(filterByField(all, field));\n },\n });\n return Object.freeze(arr);\n }, [all, clientTagged, devTagged, serverTagged]);\n\n const hasError = all.length > 0;\n\n const dismiss = useCallback((id: string) => {\n errorStore.remove(ERROR_TYPES, id);\n }, []);\n\n const dismissAll = useCallback(() => {\n errorStore.clear(ERROR_TYPES);\n }, []);\n\n return useMemo(\n () => ({ errors, hasError, dismiss, dismissAll }),\n [errors, hasError, dismiss, dismissAll]\n );\n}\n\n// ---------------- INTERNAL (SDK-only) ----------------\nconst isPromise = (v: unknown): v is Promise<unknown> =>\n typeof v === 'object' &&\n v !== null &&\n 'then' in v &&\n typeof (v as { then: unknown }).then === 'function';\n\nfunction withError<T>(actionOrPromise: (() => T | Promise<T>) | Promise<T>): T | Promise<T> {\n const handle = (e: unknown) => {\n const type = classifyType(e);\n const normalized = toErrorObject(e);\n switch (type) {\n case 'validation':\n errorManager.replaceValidationErrors([normalized]);\n break;\n case 'configuration':\n errorManager.replaceDeveloperErrors([normalized]);\n break;\n case 'auth0':\n errorManager.replaceServerErrors([normalized]);\n break;\n default: {\n console.error('[auth0-acul-react] Unhandled error:', e);\n throw e;\n }\n }\n };\n\n if (typeof actionOrPromise === 'function') {\n try {\n const result = (actionOrPromise as () => T | Promise<T>)();\n return isPromise(result)\n ? result.catch((e) => {\n handle(e);\n throw e;\n })\n : result;\n } catch (e) {\n handle(e);\n throw e;\n }\n }\n\n return actionOrPromise.catch((e) => {\n handle(e);\n throw e;\n });\n}\n\n/**\n * @hidden\n * Internal error manager for use by SDK methods.\n * Use the `useErrors` hook in React components instead.\n */\nexport const errorManager = {\n withError,\n\n replaceValidationErrors(list: Array<Omit<ErrorItem, 'id'>>, opts?: { byField?: string }) {\n if (opts?.byField) {\n errorStore.replacePartial('validation', list, opts.byField);\n } else {\n errorStore.replace('validation', list);\n }\n },\n clearValidationErrors() {\n errorStore.clear(['validation']);\n },\n pushValidationErrors(list: Omit<ErrorItem, 'id'> | Array<Omit<ErrorItem, 'id'>>) {\n errorStore.push('validation', list);\n },\n\n replaceDeveloperErrors(list: Array<Omit<ErrorItem, 'id'>>, opts?: { byField?: string }) {\n if (opts?.byField) {\n errorStore.replacePartial('configuration', list, opts.byField);\n } else {\n errorStore.replace('configuration', list);\n }\n },\n clearDeveloperErrors() {\n errorStore.clear(['configuration']);\n },\n pushDeveloperErrors(list: Omit<ErrorItem, 'id'> | Array<Omit<ErrorItem, 'id'>>) {\n errorStore.push('configuration', list);\n },\n\n replaceServerErrors(list: Array<Omit<ErrorItem, 'id'>>, opts?: { byField?: string }) {\n if (opts?.byField) {\n errorStore.replacePartial('auth0', list, opts.byField);\n } else {\n errorStore.replace('auth0', list);\n }\n },\n clearServerErrors() {\n errorStore.clear(['auth0']);\n },\n pushServerErrors(list: Omit<ErrorItem, 'id'> | Array<Omit<ErrorItem, 'id'>>) {\n errorStore.push('auth0', list);\n },\n\n syncServerErrors() {\n const server = (getServerErrors?.() ?? []) as Array<Omit<ErrorItem, 'id'>>;\n errorStore.replace('auth0', server);\n },\n};\n\nexport { ErrorItem, ErrorType };\n"],"names":["filterByField","list","field","filter","e","cacheServer","WeakMap","cacheValidation","cacheDev","tag","type","arr","cache","hit","get","out","Object","freeze","map","set","useErrors","options","includeDevErrors","snap","useSyncExternalStore","cb","errorStore","subscribe","snapshot","didInit","useRef","useEffect","current","server","getServerErrors","replace","serverTagged","useMemo","auth0","clientTagged","validation","devTagged","configuration","all","errors","assign","byType","opts","base","byField","hasError","length","dismiss","useCallback","id","remove","ERROR_TYPES","dismissAll","clear","errorManager","withError","actionOrPromise","handle","ValidationError","ConfigurationError","Auth0ServerError","classifyType","normalized","code","Error","name","undefined","message","toErrorObject","replaceValidationErrors","replaceDeveloperErrors","replaceServerErrors","console","error","result","v","then","catch","replacePartial","clearValidationErrors","pushValidationErrors","push","clearDeveloperErrors","pushDeveloperErrors","clearServerErrors","pushServerErrors","syncServerErrors"],"mappings":"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"}
|
package/dist/hooks/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export { useAuth0Themes } from './common/auth0-themes';
|
|
2
2
|
export { useCurrentScreen } from './common/current-screen';
|
|
3
|
-
export { errorManager, useErrors, type UseErrorOptions, type UseErrorsResult, type ErrorsResult, type
|
|
3
|
+
export { errorManager, useErrors, type UseErrorOptions, type UseErrorsResult, type ErrorsResult, type ErrorType, type ErrorItem, } from './common/errors';
|
|
4
4
|
export { ContextHooks } from './context';
|
|
5
5
|
export { useLoginIdentifiers } from './utility/login-identifiers';
|
|
6
6
|
export { useSignupIdentifiers } from './utility/signup-identifiers';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { AcceptInvitationMembers, CustomOptions } from '@auth0/auth0-acul-js/accept-invitation';
|
|
2
2
|
export declare const useUser: () => import("@auth0/auth0-acul-js").UserMembers, useTenant: () => import("@auth0/auth0-acul-js").TenantMembers, useBranding: () => import("@auth0/auth0-acul-js").BrandingMembers, useClient: () => import("@auth0/auth0-acul-js").ClientMembers, useOrganization: () => import("@auth0/auth0-acul-js").OrganizationMembers, usePrompt: () => import("@auth0/auth0-acul-js").PromptMembers, useScreen: () => import("@auth0/auth0-acul-js").ScreenMembersOnAcceptInvitation, useTransaction: () => import("@auth0/auth0-acul-js").TransactionMembers, useUntrustedData: () => import("@auth0/auth0-acul-js").UntrustedDataMembers;
|
|
3
3
|
export declare const acceptInvitation: (payload?: CustomOptions) => void | Promise<void>;
|
|
4
|
-
export { useCurrentScreen, useErrors, useAuth0Themes
|
|
4
|
+
export { useCurrentScreen, useErrors, useAuth0Themes } from '../hooks';
|
|
5
5
|
export declare const useAcceptInvitation: () => AcceptInvitationMembers;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"accept-invitation.js","sources":["../../src/screens/accept-invitation.tsx"],"sourcesContent":["import AcceptInvitation from '@auth0/auth0-acul-js/accept-invitation';\nimport { useMemo } from 'react';\n\nimport { ContextHooks } from '../hooks';\nimport { errorManager } from '../hooks';\nimport { registerScreen } from '../state/instance-store';\n\nimport type {\n AcceptInvitationMembers,\n CustomOptions,\n} from '@auth0/auth0-acul-js/accept-invitation';\n\n// Register the singleton instance of AcceptInvitation\nconst instance = registerScreen<AcceptInvitationMembers>(AcceptInvitation)!;\n\n// Error wrapper\nconst { withError } = errorManager;\n\n// Context hooks\nconst factory = new ContextHooks<AcceptInvitationMembers>(instance);\nexport const {\n useUser,\n useTenant,\n useBranding,\n useClient,\n useOrganization,\n usePrompt,\n useScreen,\n useTransaction,\n useUntrustedData,\n} = factory;\n\n// Submit functions\nexport const acceptInvitation = (payload?: CustomOptions) =>\n withError(instance.acceptInvitation(payload));\n\n// Common hooks\nexport {
|
|
1
|
+
{"version":3,"file":"accept-invitation.js","sources":["../../src/screens/accept-invitation.tsx"],"sourcesContent":["import AcceptInvitation from '@auth0/auth0-acul-js/accept-invitation';\nimport { useMemo } from 'react';\n\nimport { ContextHooks } from '../hooks';\nimport { errorManager } from '../hooks';\nimport { registerScreen } from '../state/instance-store';\n\nimport type {\n AcceptInvitationMembers,\n CustomOptions,\n} from '@auth0/auth0-acul-js/accept-invitation';\n\n// Register the singleton instance of AcceptInvitation\nconst instance = registerScreen<AcceptInvitationMembers>(AcceptInvitation)!;\n\n// Error wrapper\nconst { withError } = errorManager;\n\n// Context hooks\nconst factory = new ContextHooks<AcceptInvitationMembers>(instance);\nexport const {\n useUser,\n useTenant,\n useBranding,\n useClient,\n useOrganization,\n usePrompt,\n useScreen,\n useTransaction,\n useUntrustedData,\n} = factory;\n\n// Submit functions\nexport const acceptInvitation = (payload?: CustomOptions) =>\n withError(instance.acceptInvitation(payload));\n\n// Common hooks\nexport { useCurrentScreen, useErrors, useAuth0Themes } from '../hooks';\n\n// Main instance hook. Returns singleton instance of AcceptInvitation\nexport const useAcceptInvitation = (): AcceptInvitationMembers => useMemo(() => instance, []);\n"],"names":["instance","registerScreen","AcceptInvitation","withError","errorManager","factory","ContextHooks","useUser","useTenant","useBranding","useClient","useOrganization","usePrompt","useScreen","useTransaction","useUntrustedData","acceptInvitation","payload","useAcceptInvitation","useMemo"],"mappings":"ibAaA,MAAMA,EAAWC,EAAwCC,IAGnDC,UAAEA,GAAcC,EAGhBC,EAAU,IAAIC,EAAsCN,IAC7CO,QACXA,EAAOC,UACPA,EAASC,YACTA,EAAWC,UACXA,EAASC,gBACTA,EAAeC,UACfA,EAASC,UACTA,EAASC,eACTA,EAAcC,iBACdA,GACEV,EAGSW,EAAoBC,GAC/Bd,EAAUH,EAASgB,iBAAiBC,IAMzBC,EAAsB,IAA+BC,EAAQ,IAAMnB,EAAU"}
|
|
@@ -2,5 +2,5 @@ import type { ConsentMembers, CustomOptions } from '@auth0/auth0-acul-js/consent
|
|
|
2
2
|
export declare const useUser: () => import("@auth0/auth0-acul-js").UserMembers, useTenant: () => import("@auth0/auth0-acul-js").TenantMembers, useBranding: () => import("@auth0/auth0-acul-js").BrandingMembers, useClient: () => import("@auth0/auth0-acul-js").ClientMembers, useOrganization: () => import("@auth0/auth0-acul-js").OrganizationMembers, usePrompt: () => import("@auth0/auth0-acul-js").PromptMembers, useScreen: () => import("@auth0/auth0-acul-js").ScreenMembersOnConsent, useTransaction: () => import("@auth0/auth0-acul-js").TransactionMembers, useUntrustedData: () => import("@auth0/auth0-acul-js").UntrustedDataMembers;
|
|
3
3
|
export declare const accept: (payload?: CustomOptions) => void | Promise<void>;
|
|
4
4
|
export declare const deny: (payload?: CustomOptions) => void | Promise<void>;
|
|
5
|
-
export { useCurrentScreen, useErrors, useAuth0Themes
|
|
5
|
+
export { useCurrentScreen, useErrors, useAuth0Themes } from '../hooks';
|
|
6
6
|
export declare const useConsent: () => ConsentMembers;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"consent.js","sources":["../../src/screens/consent.tsx"],"sourcesContent":["import Consent from '@auth0/auth0-acul-js/consent';\nimport { useMemo } from 'react';\n\nimport { ContextHooks } from '../hooks';\nimport { errorManager } from '../hooks';\nimport { registerScreen } from '../state/instance-store';\n\nimport type { ConsentMembers, CustomOptions } from '@auth0/auth0-acul-js/consent';\n\n// Register the singleton instance of Consent\nconst instance = registerScreen<ConsentMembers>(Consent)!;\n\n// Error wrapper\nconst { withError } = errorManager;\n\n// Context hooks\nconst factory = new ContextHooks<ConsentMembers>(instance);\nexport const {\n useUser,\n useTenant,\n useBranding,\n useClient,\n useOrganization,\n usePrompt,\n useScreen,\n useTransaction,\n useUntrustedData,\n} = factory;\n\n// Submit functions\nexport const accept = (payload?: CustomOptions) => withError(instance.accept(payload));\nexport const deny = (payload?: CustomOptions) => withError(instance.deny(payload));\n\n// Common hooks\nexport {
|
|
1
|
+
{"version":3,"file":"consent.js","sources":["../../src/screens/consent.tsx"],"sourcesContent":["import Consent from '@auth0/auth0-acul-js/consent';\nimport { useMemo } from 'react';\n\nimport { ContextHooks } from '../hooks';\nimport { errorManager } from '../hooks';\nimport { registerScreen } from '../state/instance-store';\n\nimport type { ConsentMembers, CustomOptions } from '@auth0/auth0-acul-js/consent';\n\n// Register the singleton instance of Consent\nconst instance = registerScreen<ConsentMembers>(Consent)!;\n\n// Error wrapper\nconst { withError } = errorManager;\n\n// Context hooks\nconst factory = new ContextHooks<ConsentMembers>(instance);\nexport const {\n useUser,\n useTenant,\n useBranding,\n useClient,\n useOrganization,\n usePrompt,\n useScreen,\n useTransaction,\n useUntrustedData,\n} = factory;\n\n// Submit functions\nexport const accept = (payload?: CustomOptions) => withError(instance.accept(payload));\nexport const deny = (payload?: CustomOptions) => withError(instance.deny(payload));\n\n// Common hooks\nexport { useCurrentScreen, useErrors, useAuth0Themes } from '../hooks';\n\n// Main instance hook. Returns singleton instance of Consent\nexport const useConsent = (): ConsentMembers => useMemo(() => instance, []);\n"],"names":["instance","registerScreen","Consent","withError","errorManager","factory","ContextHooks","useUser","useTenant","useBranding","useClient","useOrganization","usePrompt","useScreen","useTransaction","useUntrustedData","accept","payload","deny","useConsent","useMemo"],"mappings":"uaAUA,MAAMA,EAAWC,EAA+BC,IAG1CC,UAAEA,GAAcC,EAGhBC,EAAU,IAAIC,EAA6BN,IACpCO,QACXA,EAAOC,UACPA,EAASC,YACTA,EAAWC,UACXA,EAASC,gBACTA,EAAeC,UACfA,EAASC,UACTA,EAASC,eACTA,EAAcC,iBACdA,GACEV,EAGSW,EAAUC,GAA4Bd,EAAUH,EAASgB,OAAOC,IAChEC,EAAQD,GAA4Bd,EAAUH,EAASkB,KAAKD,IAM5DE,EAAa,IAAsBC,EAAQ,IAAMpB,EAAU"}
|
|
@@ -2,5 +2,5 @@ import type { CustomizedConsentMembers, CustomOptions } from '@auth0/auth0-acul-
|
|
|
2
2
|
export declare const useUser: () => import("@auth0/auth0-acul-js").UserMembers, useTenant: () => import("@auth0/auth0-acul-js").TenantMembers, useBranding: () => import("@auth0/auth0-acul-js").BrandingMembers, useClient: () => import("@auth0/auth0-acul-js").ClientMembers, useOrganization: () => import("@auth0/auth0-acul-js").OrganizationMembers, usePrompt: () => import("@auth0/auth0-acul-js").PromptMembers, useScreen: () => import("@auth0/auth0-acul-js").ScreenMembersOnCustomizedConsent, useTransaction: () => import("@auth0/auth0-acul-js").TransactionMembers, useUntrustedData: () => import("@auth0/auth0-acul-js").UntrustedDataMembers;
|
|
3
3
|
export declare const accept: (payload?: CustomOptions) => void | Promise<void>;
|
|
4
4
|
export declare const deny: (payload?: CustomOptions) => void | Promise<void>;
|
|
5
|
-
export { useCurrentScreen, useErrors, useAuth0Themes
|
|
5
|
+
export { useCurrentScreen, useErrors, useAuth0Themes } from '../hooks';
|
|
6
6
|
export declare const useCustomizedConsent: () => CustomizedConsentMembers;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"customized-consent.js","sources":["../../src/screens/customized-consent.tsx"],"sourcesContent":["import CustomizedConsent from '@auth0/auth0-acul-js/customized-consent';\nimport { useMemo } from 'react';\n\nimport { ContextHooks } from '../hooks';\nimport { errorManager } from '../hooks';\nimport { registerScreen } from '../state/instance-store';\n\nimport type {\n CustomizedConsentMembers,\n CustomOptions,\n} from '@auth0/auth0-acul-js/customized-consent';\n\n// Register the singleton instance of CustomizedConsent\nconst instance = registerScreen<CustomizedConsentMembers>(CustomizedConsent)!;\n\n// Error wrapper\nconst { withError } = errorManager;\n\n// Context hooks\nconst factory = new ContextHooks<CustomizedConsentMembers>(instance);\nexport const {\n useUser,\n useTenant,\n useBranding,\n useClient,\n useOrganization,\n usePrompt,\n useScreen,\n useTransaction,\n useUntrustedData,\n} = factory;\n\n// Submit functions\nexport const accept = (payload?: CustomOptions) => withError(instance.accept(payload));\nexport const deny = (payload?: CustomOptions) => withError(instance.deny(payload));\n\n// Common hooks\nexport {
|
|
1
|
+
{"version":3,"file":"customized-consent.js","sources":["../../src/screens/customized-consent.tsx"],"sourcesContent":["import CustomizedConsent from '@auth0/auth0-acul-js/customized-consent';\nimport { useMemo } from 'react';\n\nimport { ContextHooks } from '../hooks';\nimport { errorManager } from '../hooks';\nimport { registerScreen } from '../state/instance-store';\n\nimport type {\n CustomizedConsentMembers,\n CustomOptions,\n} from '@auth0/auth0-acul-js/customized-consent';\n\n// Register the singleton instance of CustomizedConsent\nconst instance = registerScreen<CustomizedConsentMembers>(CustomizedConsent)!;\n\n// Error wrapper\nconst { withError } = errorManager;\n\n// Context hooks\nconst factory = new ContextHooks<CustomizedConsentMembers>(instance);\nexport const {\n useUser,\n useTenant,\n useBranding,\n useClient,\n useOrganization,\n usePrompt,\n useScreen,\n useTransaction,\n useUntrustedData,\n} = factory;\n\n// Submit functions\nexport const accept = (payload?: CustomOptions) => withError(instance.accept(payload));\nexport const deny = (payload?: CustomOptions) => withError(instance.deny(payload));\n\n// Common hooks\nexport { useCurrentScreen, useErrors, useAuth0Themes } from '../hooks';\n\n// Main instance hook. Returns singleton instance of CustomizedConsent\nexport const useCustomizedConsent = (): CustomizedConsentMembers => useMemo(() => instance, []);\n"],"names":["instance","registerScreen","CustomizedConsent","withError","errorManager","factory","ContextHooks","useUser","useTenant","useBranding","useClient","useOrganization","usePrompt","useScreen","useTransaction","useUntrustedData","accept","payload","deny","useCustomizedConsent","useMemo"],"mappings":"kbAaA,MAAMA,EAAWC,EAAyCC,IAGpDC,UAAEA,GAAcC,EAGhBC,EAAU,IAAIC,EAAuCN,IAC9CO,QACXA,EAAOC,UACPA,EAASC,YACTA,EAAWC,UACXA,EAASC,gBACTA,EAAeC,UACfA,EAASC,UACTA,EAASC,eACTA,EAAcC,iBACdA,GACEV,EAGSW,EAAUC,GAA4Bd,EAAUH,EAASgB,OAAOC,IAChEC,EAAQD,GAA4Bd,EAAUH,EAASkB,KAAKD,IAM5DE,EAAuB,IAAgCC,EAAQ,IAAMpB,EAAU"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import type { DeviceCodeActivationAllowedMembers } from '@auth0/auth0-acul-js/device-code-activation-allowed';
|
|
2
2
|
export declare const useUser: () => import("@auth0/auth0-acul-js").UserMembers, useTenant: () => import("@auth0/auth0-acul-js").TenantMembers, useBranding: () => import("@auth0/auth0-acul-js").BrandingMembers, useClient: () => import("@auth0/auth0-acul-js").ClientMembers, useOrganization: () => import("@auth0/auth0-acul-js").OrganizationMembers, usePrompt: () => import("@auth0/auth0-acul-js").PromptMembers, useScreen: () => import("@auth0/auth0-acul-js").ScreenMembers, useTransaction: () => import("@auth0/auth0-acul-js").TransactionMembers, useUntrustedData: () => import("@auth0/auth0-acul-js").UntrustedDataMembers;
|
|
3
|
-
export { useCurrentScreen, useErrors, useAuth0Themes
|
|
3
|
+
export { useCurrentScreen, useErrors, useAuth0Themes } from '../hooks';
|
|
4
4
|
export declare const useDeviceCodeActivationAllowed: () => DeviceCodeActivationAllowedMembers;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"device-code-activation-allowed.js","sources":["../../src/screens/device-code-activation-allowed.tsx"],"sourcesContent":["import DeviceCodeActivationAllowed from '@auth0/auth0-acul-js/device-code-activation-allowed';\nimport { useMemo } from 'react';\n\nimport { ContextHooks } from '../hooks';\nimport { registerScreen } from '../state/instance-store';\n\nimport type { DeviceCodeActivationAllowedMembers } from '@auth0/auth0-acul-js/device-code-activation-allowed';\n\n// Register the singleton instance of DeviceCodeActivationAllowed\nconst instance = registerScreen<DeviceCodeActivationAllowedMembers>(DeviceCodeActivationAllowed)!;\n\n// Context hooks\nconst factory = new ContextHooks<DeviceCodeActivationAllowedMembers>(instance);\nexport const {\n useUser,\n useTenant,\n useBranding,\n useClient,\n useOrganization,\n usePrompt,\n useScreen,\n useTransaction,\n useUntrustedData,\n} = factory;\n\n// Common hooks\nexport {
|
|
1
|
+
{"version":3,"file":"device-code-activation-allowed.js","sources":["../../src/screens/device-code-activation-allowed.tsx"],"sourcesContent":["import DeviceCodeActivationAllowed from '@auth0/auth0-acul-js/device-code-activation-allowed';\nimport { useMemo } from 'react';\n\nimport { ContextHooks } from '../hooks';\nimport { registerScreen } from '../state/instance-store';\n\nimport type { DeviceCodeActivationAllowedMembers } from '@auth0/auth0-acul-js/device-code-activation-allowed';\n\n// Register the singleton instance of DeviceCodeActivationAllowed\nconst instance = registerScreen<DeviceCodeActivationAllowedMembers>(DeviceCodeActivationAllowed)!;\n\n// Context hooks\nconst factory = new ContextHooks<DeviceCodeActivationAllowedMembers>(instance);\nexport const {\n useUser,\n useTenant,\n useBranding,\n useClient,\n useOrganization,\n usePrompt,\n useScreen,\n useTransaction,\n useUntrustedData,\n} = factory;\n\n// Common hooks\nexport { useCurrentScreen, useErrors, useAuth0Themes } from '../hooks';\n\n// Main instance hook. Returns singleton instance of DeviceCodeActivationAllowed\nexport const useDeviceCodeActivationAllowed = (): DeviceCodeActivationAllowedMembers =>\n useMemo(() => instance, []);\n"],"names":["instance","registerScreen","DeviceCodeActivationAllowed","factory","ContextHooks","useUser","useTenant","useBranding","useClient","useOrganization","usePrompt","useScreen","useTransaction","useUntrustedData","useDeviceCodeActivationAllowed","useMemo"],"mappings":"qYASA,MAAMA,EAAWC,EAAmDC,GAG9DC,EAAU,IAAIC,EAAiDJ,IACxDK,QACXA,EAAOC,UACPA,EAASC,YACTA,EAAWC,UACXA,EAASC,gBACTA,EAAeC,UACfA,EAASC,UACTA,EAASC,eACTA,EAAcC,iBACdA,GACEV,EAMSW,EAAiC,IAC5CC,EAAQ,IAAMf,EAAU"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import type { DeviceCodeActivationDeniedMembers } from '@auth0/auth0-acul-js/device-code-activation-denied';
|
|
2
2
|
export declare const useUser: () => import("@auth0/auth0-acul-js").UserMembers, useTenant: () => import("@auth0/auth0-acul-js").TenantMembers, useBranding: () => import("@auth0/auth0-acul-js").BrandingMembers, useClient: () => import("@auth0/auth0-acul-js").ClientMembers, useOrganization: () => import("@auth0/auth0-acul-js").OrganizationMembers, usePrompt: () => import("@auth0/auth0-acul-js").PromptMembers, useScreen: () => import("@auth0/auth0-acul-js").ScreenMembers, useTransaction: () => import("@auth0/auth0-acul-js").TransactionMembers, useUntrustedData: () => import("@auth0/auth0-acul-js").UntrustedDataMembers;
|
|
3
|
-
export { useCurrentScreen, useErrors, useAuth0Themes
|
|
3
|
+
export { useCurrentScreen, useErrors, useAuth0Themes } from '../hooks';
|
|
4
4
|
export declare const useDeviceCodeActivationDenied: () => DeviceCodeActivationDeniedMembers;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"device-code-activation-denied.js","sources":["../../src/screens/device-code-activation-denied.tsx"],"sourcesContent":["import DeviceCodeActivationDenied from '@auth0/auth0-acul-js/device-code-activation-denied';\nimport { useMemo } from 'react';\n\nimport { ContextHooks } from '../hooks';\nimport { registerScreen } from '../state/instance-store';\n\nimport type { DeviceCodeActivationDeniedMembers } from '@auth0/auth0-acul-js/device-code-activation-denied';\n\n// Register the singleton instance of DeviceCodeActivationDenied\nconst instance = registerScreen<DeviceCodeActivationDeniedMembers>(DeviceCodeActivationDenied)!;\n\n// Context hooks\nconst factory = new ContextHooks<DeviceCodeActivationDeniedMembers>(instance);\nexport const {\n useUser,\n useTenant,\n useBranding,\n useClient,\n useOrganization,\n usePrompt,\n useScreen,\n useTransaction,\n useUntrustedData,\n} = factory;\n\n// Common hooks\nexport {
|
|
1
|
+
{"version":3,"file":"device-code-activation-denied.js","sources":["../../src/screens/device-code-activation-denied.tsx"],"sourcesContent":["import DeviceCodeActivationDenied from '@auth0/auth0-acul-js/device-code-activation-denied';\nimport { useMemo } from 'react';\n\nimport { ContextHooks } from '../hooks';\nimport { registerScreen } from '../state/instance-store';\n\nimport type { DeviceCodeActivationDeniedMembers } from '@auth0/auth0-acul-js/device-code-activation-denied';\n\n// Register the singleton instance of DeviceCodeActivationDenied\nconst instance = registerScreen<DeviceCodeActivationDeniedMembers>(DeviceCodeActivationDenied)!;\n\n// Context hooks\nconst factory = new ContextHooks<DeviceCodeActivationDeniedMembers>(instance);\nexport const {\n useUser,\n useTenant,\n useBranding,\n useClient,\n useOrganization,\n usePrompt,\n useScreen,\n useTransaction,\n useUntrustedData,\n} = factory;\n\n// Common hooks\nexport { useCurrentScreen, useErrors, useAuth0Themes } from '../hooks';\n\n// Main instance hook. Returns singleton instance of DeviceCodeActivationDenied\nexport const useDeviceCodeActivationDenied = (): DeviceCodeActivationDeniedMembers =>\n useMemo(() => instance, []);\n"],"names":["instance","registerScreen","DeviceCodeActivationDenied","factory","ContextHooks","useUser","useTenant","useBranding","useClient","useOrganization","usePrompt","useScreen","useTransaction","useUntrustedData","useDeviceCodeActivationDenied","useMemo"],"mappings":"oYASA,MAAMA,EAAWC,EAAkDC,GAG7DC,EAAU,IAAIC,EAAgDJ,IACvDK,QACXA,EAAOC,UACPA,EAASC,YACTA,EAAWC,UACXA,EAASC,gBACTA,EAAeC,UACfA,EAASC,UACTA,EAASC,eACTA,EAAcC,iBACdA,GACEV,EAMSW,EAAgC,IAC3CC,EAAQ,IAAMf,EAAU"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { DeviceCodeActivationMembers, ContinueOptions } from '@auth0/auth0-acul-js/device-code-activation';
|
|
2
2
|
export declare const useUser: () => import("@auth0/auth0-acul-js").UserMembers, useTenant: () => import("@auth0/auth0-acul-js").TenantMembers, useBranding: () => import("@auth0/auth0-acul-js").BrandingMembers, useClient: () => import("@auth0/auth0-acul-js").ClientMembers, useOrganization: () => import("@auth0/auth0-acul-js").OrganizationMembers, usePrompt: () => import("@auth0/auth0-acul-js").PromptMembers, useScreen: () => import("@auth0/auth0-acul-js").ScreenMembers, useTransaction: () => import("@auth0/auth0-acul-js").TransactionMembers, useUntrustedData: () => import("@auth0/auth0-acul-js").UntrustedDataMembers;
|
|
3
3
|
export declare const continueMethod: (payload: ContinueOptions) => void | Promise<void>;
|
|
4
|
-
export { useCurrentScreen, useErrors, useAuth0Themes
|
|
4
|
+
export { useCurrentScreen, useErrors, useAuth0Themes } from '../hooks';
|
|
5
5
|
export declare const useDeviceCodeActivation: () => DeviceCodeActivationMembers;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"device-code-activation.js","sources":["../../src/screens/device-code-activation.tsx"],"sourcesContent":["import DeviceCodeActivation from '@auth0/auth0-acul-js/device-code-activation';\nimport { useMemo } from 'react';\n\nimport { ContextHooks } from '../hooks';\nimport { errorManager } from '../hooks';\nimport { registerScreen } from '../state/instance-store';\n\nimport type {\n DeviceCodeActivationMembers,\n ContinueOptions,\n} from '@auth0/auth0-acul-js/device-code-activation';\n\n// Register the singleton instance of DeviceCodeActivation\nconst instance = registerScreen<DeviceCodeActivationMembers>(DeviceCodeActivation)!;\n\n// Error wrapper\nconst { withError } = errorManager;\n\n// Context hooks\nconst factory = new ContextHooks<DeviceCodeActivationMembers>(instance);\nexport const {\n useUser,\n useTenant,\n useBranding,\n useClient,\n useOrganization,\n usePrompt,\n useScreen,\n useTransaction,\n useUntrustedData,\n} = factory;\n\n// Submit functions\nexport const continueMethod = (payload: ContinueOptions) => withError(instance.continue(payload));\n\n// Common hooks\nexport {
|
|
1
|
+
{"version":3,"file":"device-code-activation.js","sources":["../../src/screens/device-code-activation.tsx"],"sourcesContent":["import DeviceCodeActivation from '@auth0/auth0-acul-js/device-code-activation';\nimport { useMemo } from 'react';\n\nimport { ContextHooks } from '../hooks';\nimport { errorManager } from '../hooks';\nimport { registerScreen } from '../state/instance-store';\n\nimport type {\n DeviceCodeActivationMembers,\n ContinueOptions,\n} from '@auth0/auth0-acul-js/device-code-activation';\n\n// Register the singleton instance of DeviceCodeActivation\nconst instance = registerScreen<DeviceCodeActivationMembers>(DeviceCodeActivation)!;\n\n// Error wrapper\nconst { withError } = errorManager;\n\n// Context hooks\nconst factory = new ContextHooks<DeviceCodeActivationMembers>(instance);\nexport const {\n useUser,\n useTenant,\n useBranding,\n useClient,\n useOrganization,\n usePrompt,\n useScreen,\n useTransaction,\n useUntrustedData,\n} = factory;\n\n// Submit functions\nexport const continueMethod = (payload: ContinueOptions) => withError(instance.continue(payload));\n\n// Common hooks\nexport { useCurrentScreen, useErrors, useAuth0Themes } from '../hooks';\n\n// Main instance hook. Returns singleton instance of DeviceCodeActivation\nexport const useDeviceCodeActivation = (): DeviceCodeActivationMembers =>\n useMemo(() => instance, []);\n"],"names":["instance","registerScreen","DeviceCodeActivation","withError","errorManager","factory","ContextHooks","useUser","useTenant","useBranding","useClient","useOrganization","usePrompt","useScreen","useTransaction","useUntrustedData","continueMethod","payload","continue","useDeviceCodeActivation","useMemo"],"mappings":"sbAaA,MAAMA,EAAWC,EAA4CC,IAGvDC,UAAEA,GAAcC,EAGhBC,EAAU,IAAIC,EAA0CN,IACjDO,QACXA,EAAOC,UACPA,EAASC,YACTA,EAAWC,UACXA,EAASC,gBACTA,EAAeC,UACfA,EAASC,UACTA,EAASC,eACTA,EAAcC,iBACdA,GACEV,EAGSW,EAAkBC,GAA6Bd,EAAUH,EAASkB,SAASD,IAM3EE,EAA0B,IACrCC,EAAQ,IAAMpB,EAAU"}
|
|
@@ -2,5 +2,5 @@ import type { DeviceCodeConfirmationMembers, CustomOptions } from '@auth0/auth0-
|
|
|
2
2
|
export declare const useUser: () => import("@auth0/auth0-acul-js").UserMembers, useTenant: () => import("@auth0/auth0-acul-js").TenantMembers, useBranding: () => import("@auth0/auth0-acul-js").BrandingMembers, useClient: () => import("@auth0/auth0-acul-js").ClientMembers, useOrganization: () => import("@auth0/auth0-acul-js").OrganizationMembers, usePrompt: () => import("@auth0/auth0-acul-js").PromptMembers, useScreen: () => import("@auth0/auth0-acul-js").ScreenMembersOnDeviceCodeConfirmation, useTransaction: () => import("@auth0/auth0-acul-js").TransactionMembers, useUntrustedData: () => import("@auth0/auth0-acul-js").UntrustedDataMembers;
|
|
3
3
|
export declare const confirm: (payload?: CustomOptions) => void | Promise<void>;
|
|
4
4
|
export declare const cancel: (payload?: CustomOptions) => void | Promise<void>;
|
|
5
|
-
export { useCurrentScreen, useErrors, useAuth0Themes
|
|
5
|
+
export { useCurrentScreen, useErrors, useAuth0Themes } from '../hooks';
|
|
6
6
|
export declare const useDeviceCodeConfirmation: () => DeviceCodeConfirmationMembers;
|