@meistrari/auth-nuxt 3.3.7 → 3.4.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/dist/module.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@meistrari/auth-nuxt",
3
3
  "configKey": "telaAuth",
4
- "version": "3.3.7",
4
+ "version": "3.4.0",
5
5
  "builder": {
6
6
  "@nuxt/module-builder": "1.0.2",
7
7
  "unbuild": "3.6.1"
@@ -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 | 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 | 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,6 +1,6 @@
1
1
  {
2
2
  "name": "@meistrari/auth-nuxt",
3
- "version": "3.3.7",
3
+ "version": "3.4.0",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  ".": {
@@ -36,7 +36,7 @@
36
36
  "docs": "nuxt-module-build prepare && typedoc"
37
37
  },
38
38
  "dependencies": {
39
- "@meistrari/auth-core": "1.15.0",
39
+ "@meistrari/auth-core": "workspace:*",
40
40
  "jose": "6.1.3"
41
41
  },
42
42
  "peerDependencies": {