@meistrari/auth-nuxt 3.3.7 → 3.4.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.
package/dist/module.json
CHANGED
|
@@ -14,33 +14,33 @@ export declare function useSessionState(): {
|
|
|
14
14
|
*/
|
|
15
15
|
export declare function useOrganizationState(): {
|
|
16
16
|
activeOrganization: Ref<FullOrganization | null, FullOrganization | null>;
|
|
17
|
-
activeMember: Ref<{
|
|
17
|
+
activeMember: Ref<import("@meistrari/auth-core").Strict<{
|
|
18
18
|
id: string;
|
|
19
19
|
organizationId: string;
|
|
20
20
|
role: "org:admin" | "org:member" | "org:reviewer";
|
|
21
21
|
createdAt: Date;
|
|
22
22
|
userId: string;
|
|
23
|
-
teamId?: string | undefined | undefined
|
|
23
|
+
teamId?: string | undefined | undefined;
|
|
24
24
|
user: {
|
|
25
25
|
id: string;
|
|
26
26
|
email: string;
|
|
27
27
|
name: string;
|
|
28
28
|
image?: string | undefined;
|
|
29
29
|
};
|
|
30
|
-
} | null, {
|
|
30
|
+
}> | null, import("@meistrari/auth-core").Strict<{
|
|
31
31
|
id: string;
|
|
32
32
|
organizationId: string;
|
|
33
33
|
role: "org:admin" | "org:member" | "org:reviewer";
|
|
34
34
|
createdAt: Date;
|
|
35
35
|
userId: string;
|
|
36
|
-
teamId?: string | undefined | undefined
|
|
36
|
+
teamId?: string | undefined | undefined;
|
|
37
37
|
user: {
|
|
38
38
|
id: string;
|
|
39
39
|
email: string;
|
|
40
40
|
name: string;
|
|
41
41
|
image?: string | undefined;
|
|
42
42
|
};
|
|
43
|
-
} | null>;
|
|
43
|
+
}> | null>;
|
|
44
44
|
};
|
|
45
45
|
/**
|
|
46
46
|
* Shared state for application-mode authentication.
|
|
@@ -112,7 +112,9 @@ export default defineNuxtPlugin({
|
|
|
112
112
|
if (import.meta.server) {
|
|
113
113
|
if (accessTokenCookie.value) {
|
|
114
114
|
try {
|
|
115
|
-
const data = await authClient.application.whoAmI(accessTokenCookie.value
|
|
115
|
+
const data = await authClient.application.whoAmI(accessTokenCookie.value, {
|
|
116
|
+
include: ["members", "teams", "invitations"]
|
|
117
|
+
});
|
|
116
118
|
state.user.value = data.user;
|
|
117
119
|
state.activeOrganization.value = data.organization;
|
|
118
120
|
} catch (error) {
|
|
@@ -14,7 +14,9 @@ export default defineEventHandler(async (event) => {
|
|
|
14
14
|
});
|
|
15
15
|
}
|
|
16
16
|
try {
|
|
17
|
-
const { user, organization } = await authClient.application.whoAmI(accessToken
|
|
17
|
+
const { user, organization } = await authClient.application.whoAmI(accessToken, {
|
|
18
|
+
include: ["members", "teams", "invitations"]
|
|
19
|
+
});
|
|
18
20
|
return {
|
|
19
21
|
success: true,
|
|
20
22
|
user,
|
package/package.json
CHANGED
|
@@ -1,63 +1,63 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
2
|
+
"name": "@meistrari/auth-nuxt",
|
|
3
|
+
"version": "3.4.1",
|
|
4
|
+
"type": "module",
|
|
5
|
+
"exports": {
|
|
6
|
+
".": {
|
|
7
|
+
"types": "./dist/types.d.mts",
|
|
8
|
+
"import": "./dist/module.mjs"
|
|
9
|
+
},
|
|
10
|
+
"./server/middleware/auth": {
|
|
11
|
+
"types": "./dist/runtime/server/middleware/auth.d.ts",
|
|
12
|
+
"import": "./dist/runtime/server/middleware/auth.js"
|
|
13
|
+
},
|
|
14
|
+
"./server/middleware/application-auth": {
|
|
15
|
+
"types": "./dist/runtime/server/middleware/application-auth.d.ts",
|
|
16
|
+
"import": "./dist/runtime/server/middleware/application-auth.js"
|
|
17
|
+
},
|
|
18
|
+
"./core": {
|
|
19
|
+
"types": "./dist/core.d.mts",
|
|
20
|
+
"import": "./dist/core.mjs"
|
|
21
|
+
}
|
|
9
22
|
},
|
|
10
|
-
"./
|
|
11
|
-
|
|
12
|
-
|
|
23
|
+
"main": "./dist/module.mjs",
|
|
24
|
+
"typesVersions": {
|
|
25
|
+
"*": {
|
|
26
|
+
".": [
|
|
27
|
+
"./dist/types.d.mts"
|
|
28
|
+
]
|
|
29
|
+
}
|
|
13
30
|
},
|
|
14
|
-
"
|
|
15
|
-
|
|
16
|
-
|
|
31
|
+
"files": [
|
|
32
|
+
"dist"
|
|
33
|
+
],
|
|
34
|
+
"scripts": {
|
|
35
|
+
"build": "nuxt-module-build build --stub && nuxt-module-build prepare && nuxt-module-build build",
|
|
36
|
+
"docs": "nuxt-module-build prepare && typedoc"
|
|
17
37
|
},
|
|
18
|
-
"
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
"
|
|
28
|
-
|
|
38
|
+
"dependencies": {
|
|
39
|
+
"@meistrari/auth-core": "1.16.0",
|
|
40
|
+
"jose": "6.1.3"
|
|
41
|
+
},
|
|
42
|
+
"peerDependencies": {
|
|
43
|
+
"nuxt": "^3.0.0 || ^4.0.0",
|
|
44
|
+
"vue": "^3.0.0"
|
|
45
|
+
},
|
|
46
|
+
"devDependencies": {
|
|
47
|
+
"@nuxt/devtools": "2.6.3",
|
|
48
|
+
"@nuxt/eslint-config": "1.9.0",
|
|
49
|
+
"@nuxt/kit": "4.0.3",
|
|
50
|
+
"@nuxt/module-builder": "1.0.2",
|
|
51
|
+
"@nuxt/schema": "4.0.3",
|
|
52
|
+
"@nuxt/test-utils": "3.19.2",
|
|
53
|
+
"@types/node": "latest",
|
|
54
|
+
"changelogen": "0.6.2",
|
|
55
|
+
"nuxt": "4.0.3",
|
|
56
|
+
"typescript": "5.9.2",
|
|
57
|
+
"unbuild": "3.6.1",
|
|
58
|
+
"typedoc": "0.28.18",
|
|
59
|
+
"typedoc-plugin-markdown": "4.11.0",
|
|
60
|
+
"vitest": "3.2.4",
|
|
61
|
+
"vue-tsc": "3.0.6"
|
|
29
62
|
}
|
|
30
|
-
},
|
|
31
|
-
"files": [
|
|
32
|
-
"dist"
|
|
33
|
-
],
|
|
34
|
-
"scripts": {
|
|
35
|
-
"build": "nuxt-module-build build --stub && nuxt-module-build prepare && nuxt-module-build build",
|
|
36
|
-
"docs": "nuxt-module-build prepare && typedoc"
|
|
37
|
-
},
|
|
38
|
-
"dependencies": {
|
|
39
|
-
"@meistrari/auth-core": "1.15.0",
|
|
40
|
-
"jose": "6.1.3"
|
|
41
|
-
},
|
|
42
|
-
"peerDependencies": {
|
|
43
|
-
"nuxt": "^3.0.0 || ^4.0.0",
|
|
44
|
-
"vue": "^3.0.0"
|
|
45
|
-
},
|
|
46
|
-
"devDependencies": {
|
|
47
|
-
"@nuxt/devtools": "2.6.3",
|
|
48
|
-
"@nuxt/eslint-config": "1.9.0",
|
|
49
|
-
"@nuxt/kit": "4.0.3",
|
|
50
|
-
"@nuxt/module-builder": "1.0.2",
|
|
51
|
-
"@nuxt/schema": "4.0.3",
|
|
52
|
-
"@nuxt/test-utils": "3.19.2",
|
|
53
|
-
"@types/node": "latest",
|
|
54
|
-
"changelogen": "0.6.2",
|
|
55
|
-
"nuxt": "4.0.3",
|
|
56
|
-
"typescript": "5.9.2",
|
|
57
|
-
"unbuild": "3.6.1",
|
|
58
|
-
"typedoc": "0.28.18",
|
|
59
|
-
"typedoc-plugin-markdown": "4.11.0",
|
|
60
|
-
"vitest": "3.2.4",
|
|
61
|
-
"vue-tsc": "3.0.6"
|
|
62
|
-
}
|
|
63
63
|
}
|