nextauthz 1.3.28 → 1.3.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.
- package/dist/index.js +1 -0
- package/dist/index.mjs +1 -0
- package/package.json +1 -1
- package/src/AuthProvider.tsx +3 -0
package/dist/index.js
CHANGED
|
@@ -84,6 +84,7 @@ function createAuthContext(option) {
|
|
|
84
84
|
if (!userObj || !rolePath) return null;
|
|
85
85
|
return rolePath.split(".").reduce((acc, key) => acc?.[key], userObj) ?? null;
|
|
86
86
|
};
|
|
87
|
+
console.log("extractRole", extractRole);
|
|
87
88
|
(0, import_react.useEffect)(() => {
|
|
88
89
|
const storedUser = manager.getSingleToken("user");
|
|
89
90
|
const token = manager.getSingleToken(tokenKey);
|
package/dist/index.mjs
CHANGED
|
@@ -57,6 +57,7 @@ function createAuthContext(option) {
|
|
|
57
57
|
if (!userObj || !rolePath) return null;
|
|
58
58
|
return rolePath.split(".").reduce((acc, key) => acc?.[key], userObj) ?? null;
|
|
59
59
|
};
|
|
60
|
+
console.log("extractRole", extractRole);
|
|
60
61
|
useEffect(() => {
|
|
61
62
|
const storedUser = manager.getSingleToken("user");
|
|
62
63
|
const token = manager.getSingleToken(tokenKey);
|
package/package.json
CHANGED
package/src/AuthProvider.tsx
CHANGED
|
@@ -60,6 +60,9 @@ export function createAuthContext<UserType extends User = User>(option?: {
|
|
|
60
60
|
return rolePath.split('.').reduce((acc: any, key: string) => acc?.[key], userObj) ?? null
|
|
61
61
|
}
|
|
62
62
|
|
|
63
|
+
console.log('extractRole', extractRole);
|
|
64
|
+
|
|
65
|
+
|
|
63
66
|
/* ---------------------------------- */
|
|
64
67
|
/* Hydrate user from storage */
|
|
65
68
|
/* ---------------------------------- */
|