dauth-context-react 4.0.4 → 5.0.0
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.d.mts +3 -6
- package/dist/index.d.ts +3 -6
- package/dist/index.js +198 -370
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +199 -372
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- package/src/api/dauth.api.ts +73 -93
- package/src/api/interfaces/dauth.api.responses.ts +11 -13
- package/src/api/utils/config.ts +3 -11
- package/src/api/utils/routes.ts +0 -1
- package/src/constants.ts +0 -2
- package/src/index.tsx +42 -126
- package/src/initialDauthState.ts +0 -1
- package/src/interfaces.ts +8 -12
- package/src/reducer/dauth.actions.ts +114 -189
package/dist/index.d.mts
CHANGED
|
@@ -44,7 +44,6 @@ interface IDauthState {
|
|
|
44
44
|
isAuthenticated: boolean;
|
|
45
45
|
loginWithRedirect: () => void;
|
|
46
46
|
logout: () => void;
|
|
47
|
-
getAccessToken: () => Promise<string>;
|
|
48
47
|
updateUser: (fields: Partial<IDauthUser>) => Promise<boolean>;
|
|
49
48
|
updateUserWithRedirect: () => void;
|
|
50
49
|
deleteAccount: () => Promise<boolean>;
|
|
@@ -52,13 +51,11 @@ interface IDauthState {
|
|
|
52
51
|
interface IDauthProviderProps {
|
|
53
52
|
domainName: string;
|
|
54
53
|
children: React.ReactNode;
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
refreshToken?: string;
|
|
58
|
-
};
|
|
54
|
+
/** Base path of the auth proxy on the consumer backend. Default: '/api/auth'. */
|
|
55
|
+
authProxyPath?: string;
|
|
59
56
|
onError?: (error: Error) => void;
|
|
60
57
|
env?: string;
|
|
61
|
-
/** Override the dauth
|
|
58
|
+
/** Override the dauth frontend URL for loginWithRedirect (e.g. 'https://dev.dauth.ovh' for staging) */
|
|
62
59
|
dauthUrl?: string;
|
|
63
60
|
}
|
|
64
61
|
|
package/dist/index.d.ts
CHANGED
|
@@ -44,7 +44,6 @@ interface IDauthState {
|
|
|
44
44
|
isAuthenticated: boolean;
|
|
45
45
|
loginWithRedirect: () => void;
|
|
46
46
|
logout: () => void;
|
|
47
|
-
getAccessToken: () => Promise<string>;
|
|
48
47
|
updateUser: (fields: Partial<IDauthUser>) => Promise<boolean>;
|
|
49
48
|
updateUserWithRedirect: () => void;
|
|
50
49
|
deleteAccount: () => Promise<boolean>;
|
|
@@ -52,13 +51,11 @@ interface IDauthState {
|
|
|
52
51
|
interface IDauthProviderProps {
|
|
53
52
|
domainName: string;
|
|
54
53
|
children: React.ReactNode;
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
refreshToken?: string;
|
|
58
|
-
};
|
|
54
|
+
/** Base path of the auth proxy on the consumer backend. Default: '/api/auth'. */
|
|
55
|
+
authProxyPath?: string;
|
|
59
56
|
onError?: (error: Error) => void;
|
|
60
57
|
env?: string;
|
|
61
|
-
/** Override the dauth
|
|
58
|
+
/** Override the dauth frontend URL for loginWithRedirect (e.g. 'https://dev.dauth.ovh' for staging) */
|
|
62
59
|
dauthUrl?: string;
|
|
63
60
|
}
|
|
64
61
|
|