authera 1.2.8-test-2 → 1.2.8-test-3
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/helper/context.d.ts +1 -1
- package/dist/helper/types.d.ts +10 -0
- package/dist/helper/types.js +1 -0
- package/dist/index.d.ts +1 -9
- package/dist/web/index.d.ts +1 -1
- package/package.json +1 -1
package/dist/helper/context.d.ts
CHANGED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { customeFunc, storagesNames } from "./storage";
|
|
2
|
+
export interface AuthHookSettings<T extends string> {
|
|
3
|
+
backendUrl: string;
|
|
4
|
+
storage: storagesNames | customeFunc;
|
|
5
|
+
tokenType: "jwt";
|
|
6
|
+
refreshStrategy: "silent";
|
|
7
|
+
fallback_401_url: string;
|
|
8
|
+
on_after_login?: (response_data: any) => void;
|
|
9
|
+
on_after_step?: (step_key: string) => void;
|
|
10
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/dist/index.d.ts
CHANGED
|
@@ -1,13 +1,5 @@
|
|
|
1
1
|
import { customeFunc, storagesNames } from "./helper/storage";
|
|
2
|
-
|
|
3
|
-
backendUrl: string;
|
|
4
|
-
storage: storagesNames | customeFunc;
|
|
5
|
-
tokenType: "jwt";
|
|
6
|
-
refreshStrategy: "silent";
|
|
7
|
-
fallback_401_url: string;
|
|
8
|
-
on_after_login?: (response_data: any) => void;
|
|
9
|
-
on_after_step?: (step_key: string) => void;
|
|
10
|
-
}
|
|
2
|
+
import { type AuthHookSettings } from "./helper/types";
|
|
11
3
|
export default function AuthHook<T extends string>(props: AuthHookSettings<T>): {
|
|
12
4
|
createAuthProvider: (children: React.ReactNode) => React.ReactNode;
|
|
13
5
|
useAuth: () => {
|
package/dist/web/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import type { customeFunc as storageFunc } from "../helper/storage";
|
|
3
|
-
import { type AuthHookSettings } from "
|
|
3
|
+
import { type AuthHookSettings } from "../helper/types";
|
|
4
4
|
interface AuthProviderProps<T extends string> {
|
|
5
5
|
children: React.ReactNode;
|
|
6
6
|
storage: storageFunc;
|