@authing/guard-shim-react 4.5.51-eak.28 → 4.5.51-eak.29
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.
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { React } from 'shim-react';
|
|
2
2
|
import './style.less';
|
|
3
|
-
/** Authentication forms
|
|
3
|
+
/** Authentication forms share one widget until its raw token is submitted. */
|
|
4
4
|
export declare const useTurnstile: (options?: {
|
|
5
5
|
mode?: 'inline' | 'modal';
|
|
6
6
|
placement?: 'inline' | 'send-code' | 'page';
|
|
@@ -16,6 +16,7 @@ export declare const useTurnstile: (options?: {
|
|
|
16
16
|
getTurnstileParams: () => Promise<Record<string, string>>;
|
|
17
17
|
turnstileView: JSX.Element | null;
|
|
18
18
|
sendDisabled: boolean;
|
|
19
|
+
retryAfterFailure: (token: string) => void;
|
|
19
20
|
};
|
|
20
21
|
/** One native widget across normal login/register forms; other modules do not gate submission. */
|
|
21
22
|
export declare const TurnstileProvider: React.FC<{
|
|
@@ -2,7 +2,8 @@ import { AuthingGuardResponse, AuthingResponse } from './http';
|
|
|
2
2
|
import { CodeAction } from './responseManagement/interface';
|
|
3
3
|
export declare class GuardHttp {
|
|
4
4
|
private turnstileProofReader?;
|
|
5
|
-
|
|
5
|
+
private turnstileFailureHandler?;
|
|
6
|
+
setTurnstileProofReader: (reader: () => Promise<Record<string, string>>, onFailure?: (token: string) => void) => () => void;
|
|
6
7
|
private requestClient;
|
|
7
8
|
private headers;
|
|
8
9
|
private responseInterceptorMap;
|
|
@@ -1,2 +1,6 @@
|
|
|
1
|
-
/**
|
|
1
|
+
/** Preserve a token already supplied by the caller or another transport. */
|
|
2
|
+
export declare const hasTurnstileToken: (url: string, data?: any) => boolean;
|
|
3
|
+
/** Business errors consume a raw token; MFA/next-step responses do not retry. */
|
|
4
|
+
export declare const turnstileSubmissionFailed: (data: any) => boolean;
|
|
5
|
+
/** Only normal registration/login submissions carry the raw human token. */
|
|
2
6
|
export declare const needsTurnstileProof: (url: string, data?: any) => boolean;
|
package/package.json
CHANGED