@whippsp/auth0-helper 1.0.9 → 1.1.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/index.d.ts +33 -0
- package/package.json +6 -1
package/index.d.ts
ADDED
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
// index.d.ts
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Configuration for the Auth0 Helper
|
|
5
|
+
*/
|
|
6
|
+
export interface HelperConfig {
|
|
7
|
+
ActionName?: string;
|
|
8
|
+
debug?: boolean;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* Extend the global namespace to add our custom methods to the Auth0 objects
|
|
13
|
+
*/
|
|
14
|
+
declare global {
|
|
15
|
+
// We augment the 'api' object used in Post-Login Actions
|
|
16
|
+
interface PostLoginAPI {
|
|
17
|
+
/** * Sets a metadata flag that tells all subsequent Actions in this flow to exit immediately.
|
|
18
|
+
*/
|
|
19
|
+
skipRemaining(): void;
|
|
20
|
+
|
|
21
|
+
/** * Updates the helper's configuration (like debug mode or ActionName) at runtime.
|
|
22
|
+
*/
|
|
23
|
+
setHelperConfig(config: HelperConfig): void;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* The initialization function exported by the library
|
|
29
|
+
*/
|
|
30
|
+
declare function init(userModule: any, initialConfig?: HelperConfig): void;
|
|
31
|
+
|
|
32
|
+
export default init;
|
|
33
|
+
export = init;
|
package/package.json
CHANGED
|
@@ -1,8 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@whippsp/auth0-helper",
|
|
3
|
-
"version": "1.0
|
|
3
|
+
"version": "1.1.0",
|
|
4
4
|
"description": "A helper to override Auth0 Actions handlers with skip logic.",
|
|
5
5
|
"main": "Auth0Helper.js",
|
|
6
|
+
"types": "index.d.ts",
|
|
7
|
+
"files": [
|
|
8
|
+
"Auth0Helper.js",
|
|
9
|
+
"index.d.ts"
|
|
10
|
+
],
|
|
6
11
|
"publishConfig": {
|
|
7
12
|
"access": "public"
|
|
8
13
|
},
|