@privy-io/react-auth 1.49.2 → 1.49.3-beta-20231130190830
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/dist/esm/index.js +364 -373
- package/dist/index.d.ts +26 -0
- package/dist/index.js +355 -364
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -1274,6 +1274,7 @@ type PrivyServerConfig = {
|
|
|
1274
1274
|
logoUrl?: string;
|
|
1275
1275
|
/** May be deprecated from the server config in a future release */
|
|
1276
1276
|
accentColor?: string;
|
|
1277
|
+
mfaMethods?: Array<MfaMethod>;
|
|
1277
1278
|
};
|
|
1278
1279
|
type HexColor = `#${string}`;
|
|
1279
1280
|
/**
|
|
@@ -1480,6 +1481,20 @@ type PrivyClientConfig = {
|
|
|
1480
1481
|
*/
|
|
1481
1482
|
priceDisplay?: PriceDisplayOptions;
|
|
1482
1483
|
};
|
|
1484
|
+
/**
|
|
1485
|
+
* All multi-factor authentication configuration
|
|
1486
|
+
*/
|
|
1487
|
+
mfa?: {
|
|
1488
|
+
/**
|
|
1489
|
+
* If true, Privy will not prompt or instantiate any UI for MFA Verification. The developer
|
|
1490
|
+
* must handle MFA verification themselves.
|
|
1491
|
+
* If false, any action that requires MFA will raise a modal and require user to verify MFA
|
|
1492
|
+
* before proceeding.
|
|
1493
|
+
*
|
|
1494
|
+
* Defaults to false.
|
|
1495
|
+
*/
|
|
1496
|
+
noPromptOnMfaRequired?: boolean;
|
|
1497
|
+
};
|
|
1483
1498
|
/**
|
|
1484
1499
|
* Setting associated with fiat-on-ramp flows
|
|
1485
1500
|
*/
|
|
@@ -1934,6 +1949,13 @@ interface PrivyInterface {
|
|
|
1934
1949
|
* @returns Promise for the signature as a string
|
|
1935
1950
|
*/
|
|
1936
1951
|
signMessage: (message: string, uiOptions?: SignMessageModalUIOptions) => Promise<string>;
|
|
1952
|
+
/**
|
|
1953
|
+
* Function to control the visibility of the enrollment modal.
|
|
1954
|
+
*
|
|
1955
|
+
* @param show {boolean} controls the visibility of the enrollment modal.
|
|
1956
|
+
* @returns Promise for opening the enrollment modal.
|
|
1957
|
+
*/
|
|
1958
|
+
enrollInMfa: (show?: boolean) => void;
|
|
1937
1959
|
/**
|
|
1938
1960
|
* Initiate the enrollment flow for MFA for the current user.
|
|
1939
1961
|
*
|
|
@@ -2154,6 +2176,8 @@ declare function useMfa(): {
|
|
|
2154
2176
|
* @returns submitEnrollmentWithTotp - completes the MFA enrollment flow for TOTP
|
|
2155
2177
|
* @returns unenrollWithSms - unenrolls the SMS MFA method
|
|
2156
2178
|
* @returns unenrollWithTotp - unenrolls the TOTP MFA method
|
|
2179
|
+
* @returns showMfaEnrollmentModal - opens the MFA enrollment modal
|
|
2180
|
+
* @returns closeMfaEnrollmentModal - closes the MFA enrollment modal
|
|
2157
2181
|
*
|
|
2158
2182
|
* @example
|
|
2159
2183
|
* const {initEnrollment} = useMfaEnrollment();
|
|
@@ -2200,6 +2224,8 @@ declare function useMfaEnrollment(): {
|
|
|
2200
2224
|
}) => Promise<void>;
|
|
2201
2225
|
unenrollWithSms: () => Promise<void>;
|
|
2202
2226
|
unenrollWithTotp: () => Promise<void>;
|
|
2227
|
+
showMfaEnrollmentModal: () => void;
|
|
2228
|
+
closeMfaEnrollmentModal: () => void;
|
|
2203
2229
|
};
|
|
2204
2230
|
|
|
2205
2231
|
declare class PrivyIframeError extends Error {
|