@australiangreens/ag-internal-components 0.1.0 → 0.1.1

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,10 +1,11 @@
1
1
  import { PropsWithChildren } from 'react';
2
2
  export interface AuthGuardProps {
3
3
  appName?: string;
4
- /** Defaults to 'none'. If set to 'all', will always re-throw the error, so
4
+ /** Defaults to 'unknown'. If set to 'all', will always re-throw the error, so
5
5
  * won't display the normal message to user and be handled elsewhere in the
6
6
  * app. If set to 'unknown', this will only be done if the failure reason
7
- * couldn't be inferred from the error description etc. */
7
+ * couldn't be inferred from the error description etc or if its a completely
8
+ * unknown error without a description etc.*/
8
9
  throwErrors?: 'none' | 'unknown' | 'all';
9
10
  /** Called in case of an authentication error, regardless of if its recognised
10
11
  * or not */
@@ -1 +1 @@
1
- {"version":3,"file":"AuthGuard.d.ts","sourceRoot":"","sources":["../../../src/components/AuthGuard/AuthGuard.tsx"],"names":[],"mappings":"AAUA,OAAO,EAAE,iBAAiB,EAAa,MAAM,OAAO,CAAC;AAQrD,MAAM,WAAW,cAAc;IAC7B,OAAO,CAAC,EAAE,MAAM,CAAC;IAEjB;;;8DAG0D;IAC1D,WAAW,CAAC,EAAE,MAAM,GAAG,SAAS,GAAG,KAAK,CAAC;IAEzC;gBACY;IACZ,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI,CAAC;IAEjC,qBAAqB,CAAC,EAAE,OAAO,CAAC;CACjC;AAED;;;;;;;;;;;;GAYG;AACH,MAAM,CAAC,OAAO,UAAU,SAAS,CAAC,EAChC,QAAQ,EACR,OAAmB,EACnB,WAAW,EACX,qBAA6B,EAC7B,OAAkB,GACnB,EAAE,iBAAiB,CAAC,cAAc,CAAC,eA4EnC"}
1
+ {"version":3,"file":"AuthGuard.d.ts","sourceRoot":"","sources":["../../../src/components/AuthGuard/AuthGuard.tsx"],"names":[],"mappings":"AAUA,OAAO,EAAE,iBAAiB,EAAa,MAAM,OAAO,CAAC;AASrD,MAAM,WAAW,cAAc;IAC7B,OAAO,CAAC,EAAE,MAAM,CAAC;IAEjB;;;;iDAI6C;IAC7C,WAAW,CAAC,EAAE,MAAM,GAAG,SAAS,GAAG,KAAK,CAAC;IAEzC;gBACY;IACZ,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI,CAAC;IAEjC,qBAAqB,CAAC,EAAE,OAAO,CAAC;CACjC;AAED;;;;;;;;;;;;GAYG;AACH,MAAM,CAAC,OAAO,UAAU,SAAS,CAAC,EAChC,QAAQ,EACR,OAAmB,EACnB,WAAoB,EACpB,qBAA6B,EAC7B,OAAkB,GACnB,EAAE,iBAAiB,CAAC,cAAc,CAAC,eA4EnC"}
@@ -17,4 +17,11 @@ export declare function errorFromApplicationAccessRejection(errorObject: OAuthEr
17
17
  * first login.
18
18
  */
19
19
  export declare function errorFromUserNotAuthorisingApp(errorObject: OAuthError): boolean;
20
+ /**
21
+ * Will only return true if the error looks like it was due to script execution
22
+ * time issue. Specifically, the execution of custom actions in the login flow
23
+ * exceeded the time limit (20s at time of writing). Mostly likely issues
24
+ * syncing user data with AG internal systems.
25
+ */
26
+ export declare function errorFromScriptExecutionTimeout(errorObject: OAuthError): false | RegExpMatchArray | null;
20
27
  //# sourceMappingURL=auth0ErrorParsing.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"auth0ErrorParsing.d.ts","sourceRoot":"","sources":["../../../src/components/AuthGuard/auth0ErrorParsing.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAEhD;;;;GAIG;AACH,wBAAgB,YAAY,CAAC,KAAK,EAAE,KAAK,GAAG,KAAK,IAAI,UAAU,CAE9D;AAED;;;;GAIG;AACH,wBAAgB,mCAAmC,CAAC,WAAW,EAAE,UAAU,WAQ1E;AAED;;;;GAIG;AACH,wBAAgB,8BAA8B,CAAC,WAAW,EAAE,UAAU,WAOrE"}
1
+ {"version":3,"file":"auth0ErrorParsing.d.ts","sourceRoot":"","sources":["../../../src/components/AuthGuard/auth0ErrorParsing.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAEhD;;;;GAIG;AACH,wBAAgB,YAAY,CAAC,KAAK,EAAE,KAAK,GAAG,KAAK,IAAI,UAAU,CAE9D;AAED;;;;GAIG;AACH,wBAAgB,mCAAmC,CAAC,WAAW,EAAE,UAAU,WAQ1E;AAED;;;;GAIG;AACH,wBAAgB,8BAA8B,CAAC,WAAW,EAAE,UAAU,WAOrE;AAED;;;;;GAKG;AACH,wBAAgB,+BAA+B,CAAC,WAAW,EAAE,UAAU,mCAKtE"}