@pubflow/react 0.4.12 → 0.4.13
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/index.cjs +98 -4
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +6 -1
- package/dist/index.esm.js +99 -5
- package/dist/index.esm.js.map +1 -1
- package/dist/types/context/PubflowProvider.d.ts +6 -1
- package/package.json +1 -1
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* Following the same pattern as Next.js and React Native packages
|
|
6
6
|
*/
|
|
7
7
|
import React from 'react';
|
|
8
|
-
import { PubflowInstanceConfig, ApiClient, AuthService, User } from '@pubflow/core';
|
|
8
|
+
import { PubflowInstanceConfig, ApiClient, AuthService, TwoFactorService, User, type TwoFactorMethod, type TwoFactorStartResult, type TwoFactorVerifyResult } from '@pubflow/core';
|
|
9
9
|
/**
|
|
10
10
|
* Pubflow context value
|
|
11
11
|
*/
|
|
@@ -21,9 +21,12 @@ export interface PubflowInstance {
|
|
|
21
21
|
config: PubflowInstanceConfig;
|
|
22
22
|
apiClient: ApiClient;
|
|
23
23
|
authService: AuthService;
|
|
24
|
+
twoFactorService: TwoFactorService;
|
|
24
25
|
user: User | null | undefined;
|
|
25
26
|
isAuthenticated: boolean;
|
|
26
27
|
isLoading: boolean;
|
|
28
|
+
twoFactorPending: boolean;
|
|
29
|
+
twoFactorMethods: TwoFactorMethod[];
|
|
27
30
|
login: (credentials: {
|
|
28
31
|
email?: string;
|
|
29
32
|
userName?: string;
|
|
@@ -35,6 +38,8 @@ export interface PubflowInstance {
|
|
|
35
38
|
expiresAt?: string;
|
|
36
39
|
user?: User;
|
|
37
40
|
}>;
|
|
41
|
+
startTwoFactor: (methodId: string, method: string) => Promise<TwoFactorStartResult>;
|
|
42
|
+
verifyTwoFactor: (methodId: string, code: string) => Promise<TwoFactorVerifyResult>;
|
|
38
43
|
}
|
|
39
44
|
/**
|
|
40
45
|
* Create Pubflow context
|
package/package.json
CHANGED