@opexa/portal-components 0.0.937 → 0.0.939
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.
|
@@ -33,21 +33,6 @@ export const useSessionHealthQuery = (config) => {
|
|
|
33
33
|
});
|
|
34
34
|
return ok;
|
|
35
35
|
},
|
|
36
|
-
|
|
37
|
-
console.log('query', query);
|
|
38
|
-
if (query.state.error?.message === 'MEMBER_ACCOUNT_DISABLED' &&
|
|
39
|
-
query.state.errorUpdateCount < 10) {
|
|
40
|
-
return 5000;
|
|
41
|
-
}
|
|
42
|
-
return false;
|
|
43
|
-
},
|
|
44
|
-
retry: (failureCount, error) => {
|
|
45
|
-
console.log('failureCount', failureCount);
|
|
46
|
-
console.log('error', error);
|
|
47
|
-
if (error?.message === 'MEMBER_ACCOUNT_DISABLED' && failureCount < 10) {
|
|
48
|
-
return true;
|
|
49
|
-
}
|
|
50
|
-
return false;
|
|
51
|
-
},
|
|
36
|
+
retry: 5,
|
|
52
37
|
});
|
|
53
38
|
};
|
package/dist/services/auth.d.ts
CHANGED
|
@@ -69,7 +69,7 @@ export interface RefreshSessionMutation extends Omit<CreateSessionTwoFactorAuthD
|
|
|
69
69
|
}
|
|
70
70
|
export declare function refreshSession(options?: HttpRequestOptions): Promise<RefreshSessionMutation>;
|
|
71
71
|
export declare function destroySession(options?: HttpRequestOptions): Promise<void>;
|
|
72
|
-
export declare function getSessionHealth(options?: HttpRequestOptions): Promise<
|
|
72
|
+
export declare function getSessionHealth(options?: HttpRequestOptions): Promise<boolean>;
|
|
73
73
|
export interface SendVerificationCodeInput {
|
|
74
74
|
strict?: boolean;
|
|
75
75
|
channel: 'SMS' | 'EMAIL';
|
package/dist/services/auth.js
CHANGED
|
@@ -129,12 +129,6 @@ export async function destroySession(options) {
|
|
|
129
129
|
export async function getSessionHealth(options) {
|
|
130
130
|
try {
|
|
131
131
|
const res = await fetch(`${AUTH_ENDPOINT}/session`, options);
|
|
132
|
-
if (!res.ok) {
|
|
133
|
-
const error = new Error();
|
|
134
|
-
error.message =
|
|
135
|
-
res.status === 403 ? 'MEMBER_ACCOUNT_DISABLED' : 'SESSION_HEALTH_ERROR';
|
|
136
|
-
throw error;
|
|
137
|
-
}
|
|
138
132
|
return res.ok;
|
|
139
133
|
}
|
|
140
134
|
catch {
|