authera 1.2.8-test-16 → 1.2.8-test-18
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/hooks/useAuth.d.ts +0 -1
- package/dist/hooks/useAuth.js +8 -7
- package/dist/index.d.ts +0 -1
- package/dist/web/login.js +1 -0
- package/package.json +1 -1
package/dist/hooks/useAuth.d.ts
CHANGED
package/dist/hooks/useAuth.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
"use client";
|
|
1
2
|
import { AuthContext, } from "../helper/context";
|
|
2
3
|
import React from "react";
|
|
3
4
|
export function useAuth() {
|
|
@@ -49,12 +50,12 @@ export function useAuth() {
|
|
|
49
50
|
const setRefreshToken = (token) => {
|
|
50
51
|
ctx.set("refresh_token", token);
|
|
51
52
|
};
|
|
52
|
-
const logout = () => {
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
};
|
|
53
|
+
// const logout = () => {
|
|
54
|
+
// setUserData(null as any);
|
|
55
|
+
// setPermits([]);
|
|
56
|
+
// ctx.set("refresh_token", null);
|
|
57
|
+
// ctx.set("access_token", null);
|
|
58
|
+
// };
|
|
58
59
|
return {
|
|
59
60
|
permits: prm,
|
|
60
61
|
isPermitted,
|
|
@@ -67,7 +68,7 @@ export function useAuth() {
|
|
|
67
68
|
user,
|
|
68
69
|
setAccessToken,
|
|
69
70
|
setRefreshToken,
|
|
70
|
-
logout,
|
|
71
|
+
// logout,
|
|
71
72
|
...authera_props,
|
|
72
73
|
};
|
|
73
74
|
}
|
package/dist/index.d.ts
CHANGED
|
@@ -24,7 +24,6 @@ export default function AuthHook<T extends string>(props: AuthHookSettings<T>):
|
|
|
24
24
|
};
|
|
25
25
|
setAccessToken: (token: string) => void;
|
|
26
26
|
setRefreshToken: (token: string) => void;
|
|
27
|
-
logout: () => void;
|
|
28
27
|
};
|
|
29
28
|
LoginScenario: () => import("react/jsx-runtime").JSX.Element;
|
|
30
29
|
};
|
package/dist/web/login.js
CHANGED