@meistrari/auth-nuxt 3.0.3 → 3.0.5
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 +1 -1
- package/dist/runtime/composables/application-auth.d.ts +39 -2
- package/dist/runtime/composables/state.d.ts +175 -6
- package/dist/runtime/server/routes/auth/organizations.d.ts +1 -1
- package/dist/runtime/server/routes/auth/refresh.d.ts +20 -2
- package/dist/runtime/server/routes/auth/switch-organization.d.ts +20 -2
- package/dist/runtime/server/routes/auth/whoami.d.ts +20 -2
- package/dist/runtime/shared.d.ts +2 -1
- package/package.json +11 -7
package/dist/module.json
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { FullOrganization } from '@meistrari/auth-core';
|
|
1
2
|
/**
|
|
2
3
|
* Composable for managing Tela application authentication with OAuth 2.0 PKCE flow
|
|
3
4
|
*
|
|
@@ -40,6 +41,42 @@ export declare function useTelaApplicationAuth(): {
|
|
|
40
41
|
switchOrganization: (organizationId: string) => Promise<void>;
|
|
41
42
|
refreshToken: () => Promise<void>;
|
|
42
43
|
getToken: () => Promise<string | null | undefined>;
|
|
43
|
-
user: import("vue").Ref<
|
|
44
|
-
|
|
44
|
+
user: import("vue").Ref<import("better-auth").StripEmptyObjects<{
|
|
45
|
+
id: string;
|
|
46
|
+
createdAt: Date;
|
|
47
|
+
updatedAt: Date;
|
|
48
|
+
email: string;
|
|
49
|
+
emailVerified: boolean;
|
|
50
|
+
name: string;
|
|
51
|
+
image?: string | null | undefined;
|
|
52
|
+
} & {
|
|
53
|
+
twoFactorEnabled: boolean | null | undefined;
|
|
54
|
+
} & {
|
|
55
|
+
banned: boolean | null | undefined;
|
|
56
|
+
} & {
|
|
57
|
+
role?: string | null | undefined;
|
|
58
|
+
banReason?: string | null | undefined;
|
|
59
|
+
banExpires?: Date | null | undefined;
|
|
60
|
+
} & {
|
|
61
|
+
lastActiveAt?: Date | null | undefined;
|
|
62
|
+
}> | null, import("better-auth").StripEmptyObjects<{
|
|
63
|
+
id: string;
|
|
64
|
+
createdAt: Date;
|
|
65
|
+
updatedAt: Date;
|
|
66
|
+
email: string;
|
|
67
|
+
emailVerified: boolean;
|
|
68
|
+
name: string;
|
|
69
|
+
image?: string | null | undefined;
|
|
70
|
+
} & {
|
|
71
|
+
twoFactorEnabled: boolean | null | undefined;
|
|
72
|
+
} & {
|
|
73
|
+
banned: boolean | null | undefined;
|
|
74
|
+
} & {
|
|
75
|
+
role?: string | null | undefined;
|
|
76
|
+
banReason?: string | null | undefined;
|
|
77
|
+
banExpires?: Date | null | undefined;
|
|
78
|
+
} & {
|
|
79
|
+
lastActiveAt?: Date | null | undefined;
|
|
80
|
+
}> | null>;
|
|
81
|
+
activeOrganization: import("vue").Ref<FullOrganization | null, FullOrganization | null>;
|
|
45
82
|
};
|
|
@@ -1,20 +1,189 @@
|
|
|
1
|
+
import type { FullOrganization } from '@meistrari/auth-core';
|
|
1
2
|
/**
|
|
2
3
|
* Shared state for session management.
|
|
3
4
|
* This module provides access to session-related state without creating circular dependencies.
|
|
4
5
|
*/
|
|
5
6
|
export declare function useSessionState(): {
|
|
6
|
-
user: import("vue").Ref<
|
|
7
|
-
|
|
7
|
+
user: import("vue").Ref<import("better-auth").StripEmptyObjects<{
|
|
8
|
+
id: string;
|
|
9
|
+
createdAt: Date;
|
|
10
|
+
updatedAt: Date;
|
|
11
|
+
email: string;
|
|
12
|
+
emailVerified: boolean;
|
|
13
|
+
name: string;
|
|
14
|
+
image?: string | null | undefined;
|
|
15
|
+
} & {
|
|
16
|
+
twoFactorEnabled: boolean | null | undefined;
|
|
17
|
+
} & {
|
|
18
|
+
banned: boolean | null | undefined;
|
|
19
|
+
} & {
|
|
20
|
+
role?: string | null | undefined;
|
|
21
|
+
banReason?: string | null | undefined;
|
|
22
|
+
banExpires?: Date | null | undefined;
|
|
23
|
+
} & {
|
|
24
|
+
lastActiveAt?: Date | null | undefined;
|
|
25
|
+
}> | null, import("better-auth").StripEmptyObjects<{
|
|
26
|
+
id: string;
|
|
27
|
+
createdAt: Date;
|
|
28
|
+
updatedAt: Date;
|
|
29
|
+
email: string;
|
|
30
|
+
emailVerified: boolean;
|
|
31
|
+
name: string;
|
|
32
|
+
image?: string | null | undefined;
|
|
33
|
+
} & {
|
|
34
|
+
twoFactorEnabled: boolean | null | undefined;
|
|
35
|
+
} & {
|
|
36
|
+
banned: boolean | null | undefined;
|
|
37
|
+
} & {
|
|
38
|
+
role?: string | null | undefined;
|
|
39
|
+
banReason?: string | null | undefined;
|
|
40
|
+
banExpires?: Date | null | undefined;
|
|
41
|
+
} & {
|
|
42
|
+
lastActiveAt?: Date | null | undefined;
|
|
43
|
+
}> | null>;
|
|
44
|
+
session: import("vue").Ref<{
|
|
45
|
+
user: import("better-auth").StripEmptyObjects<{
|
|
46
|
+
id: string;
|
|
47
|
+
createdAt: Date;
|
|
48
|
+
updatedAt: Date;
|
|
49
|
+
email: string;
|
|
50
|
+
emailVerified: boolean;
|
|
51
|
+
name: string;
|
|
52
|
+
image?: string | null | undefined;
|
|
53
|
+
} & {
|
|
54
|
+
twoFactorEnabled: boolean | null | undefined;
|
|
55
|
+
} & {} & {
|
|
56
|
+
banned: boolean | null | undefined;
|
|
57
|
+
} & {
|
|
58
|
+
role?: string | null | undefined;
|
|
59
|
+
banReason?: string | null | undefined;
|
|
60
|
+
banExpires?: Date | null | undefined;
|
|
61
|
+
} & {} & {
|
|
62
|
+
lastActiveAt?: Date | null | undefined;
|
|
63
|
+
}>;
|
|
64
|
+
session: import("better-auth").StripEmptyObjects<{
|
|
65
|
+
id: string;
|
|
66
|
+
createdAt: Date;
|
|
67
|
+
updatedAt: Date;
|
|
68
|
+
userId: string;
|
|
69
|
+
expiresAt: Date;
|
|
70
|
+
token: string;
|
|
71
|
+
ipAddress?: string | null | undefined;
|
|
72
|
+
userAgent?: string | null | undefined;
|
|
73
|
+
} & {} & {
|
|
74
|
+
activeOrganizationId?: string | null | undefined;
|
|
75
|
+
activeTeamId?: string | null | undefined;
|
|
76
|
+
} & {} & {
|
|
77
|
+
impersonatedBy?: string | null | undefined;
|
|
78
|
+
} & {} & {}>;
|
|
79
|
+
} | null, {
|
|
80
|
+
user: import("better-auth").StripEmptyObjects<{
|
|
81
|
+
id: string;
|
|
82
|
+
createdAt: Date;
|
|
83
|
+
updatedAt: Date;
|
|
84
|
+
email: string;
|
|
85
|
+
emailVerified: boolean;
|
|
86
|
+
name: string;
|
|
87
|
+
image?: string | null | undefined;
|
|
88
|
+
} & {
|
|
89
|
+
twoFactorEnabled: boolean | null | undefined;
|
|
90
|
+
} & {} & {
|
|
91
|
+
banned: boolean | null | undefined;
|
|
92
|
+
} & {
|
|
93
|
+
role?: string | null | undefined;
|
|
94
|
+
banReason?: string | null | undefined;
|
|
95
|
+
banExpires?: Date | null | undefined;
|
|
96
|
+
} & {} & {
|
|
97
|
+
lastActiveAt?: Date | null | undefined;
|
|
98
|
+
}>;
|
|
99
|
+
session: import("better-auth").StripEmptyObjects<{
|
|
100
|
+
id: string;
|
|
101
|
+
createdAt: Date;
|
|
102
|
+
updatedAt: Date;
|
|
103
|
+
userId: string;
|
|
104
|
+
expiresAt: Date;
|
|
105
|
+
token: string;
|
|
106
|
+
ipAddress?: string | null | undefined;
|
|
107
|
+
userAgent?: string | null | undefined;
|
|
108
|
+
} & {} & {
|
|
109
|
+
activeOrganizationId?: string | null | undefined;
|
|
110
|
+
activeTeamId?: string | null | undefined;
|
|
111
|
+
} & {} & {
|
|
112
|
+
impersonatedBy?: string | null | undefined;
|
|
113
|
+
} & {} & {}>;
|
|
114
|
+
} | null>;
|
|
8
115
|
};
|
|
9
116
|
/**
|
|
10
117
|
* Shared state for organization management.
|
|
11
118
|
* This module provides access to organization-related state without creating circular dependencies.
|
|
12
119
|
*/
|
|
13
120
|
export declare function useOrganizationState(): {
|
|
14
|
-
activeOrganization: import("vue").Ref<
|
|
15
|
-
activeMember: import("vue").Ref<
|
|
121
|
+
activeOrganization: import("vue").Ref<FullOrganization | null, FullOrganization | null>;
|
|
122
|
+
activeMember: import("vue").Ref<{
|
|
123
|
+
id: string;
|
|
124
|
+
organizationId: string;
|
|
125
|
+
role: "org:admin" | "org:member" | "org:reviewer";
|
|
126
|
+
createdAt: Date;
|
|
127
|
+
userId: string;
|
|
128
|
+
teamId?: string | undefined | undefined | undefined;
|
|
129
|
+
user: {
|
|
130
|
+
id: string;
|
|
131
|
+
email: string;
|
|
132
|
+
name: string;
|
|
133
|
+
image?: string | undefined;
|
|
134
|
+
};
|
|
135
|
+
} | null, {
|
|
136
|
+
id: string;
|
|
137
|
+
organizationId: string;
|
|
138
|
+
role: "org:admin" | "org:member" | "org:reviewer";
|
|
139
|
+
createdAt: Date;
|
|
140
|
+
userId: string;
|
|
141
|
+
teamId?: string | undefined | undefined | undefined;
|
|
142
|
+
user: {
|
|
143
|
+
id: string;
|
|
144
|
+
email: string;
|
|
145
|
+
name: string;
|
|
146
|
+
image?: string | undefined;
|
|
147
|
+
};
|
|
148
|
+
} | null>;
|
|
16
149
|
};
|
|
17
150
|
export declare function useApplicationSessionState(): {
|
|
18
|
-
user: import("vue").Ref<
|
|
19
|
-
|
|
151
|
+
user: import("vue").Ref<import("better-auth").StripEmptyObjects<{
|
|
152
|
+
id: string;
|
|
153
|
+
createdAt: Date;
|
|
154
|
+
updatedAt: Date;
|
|
155
|
+
email: string;
|
|
156
|
+
emailVerified: boolean;
|
|
157
|
+
name: string;
|
|
158
|
+
image?: string | null | undefined;
|
|
159
|
+
} & {
|
|
160
|
+
twoFactorEnabled: boolean | null | undefined;
|
|
161
|
+
} & {
|
|
162
|
+
banned: boolean | null | undefined;
|
|
163
|
+
} & {
|
|
164
|
+
role?: string | null | undefined;
|
|
165
|
+
banReason?: string | null | undefined;
|
|
166
|
+
banExpires?: Date | null | undefined;
|
|
167
|
+
} & {
|
|
168
|
+
lastActiveAt?: Date | null | undefined;
|
|
169
|
+
}> | null, import("better-auth").StripEmptyObjects<{
|
|
170
|
+
id: string;
|
|
171
|
+
createdAt: Date;
|
|
172
|
+
updatedAt: Date;
|
|
173
|
+
email: string;
|
|
174
|
+
emailVerified: boolean;
|
|
175
|
+
name: string;
|
|
176
|
+
image?: string | null | undefined;
|
|
177
|
+
} & {
|
|
178
|
+
twoFactorEnabled: boolean | null | undefined;
|
|
179
|
+
} & {
|
|
180
|
+
banned: boolean | null | undefined;
|
|
181
|
+
} & {
|
|
182
|
+
role?: string | null | undefined;
|
|
183
|
+
banReason?: string | null | undefined;
|
|
184
|
+
banExpires?: Date | null | undefined;
|
|
185
|
+
} & {
|
|
186
|
+
lastActiveAt?: Date | null | undefined;
|
|
187
|
+
}> | null>;
|
|
188
|
+
activeOrganization: import("vue").Ref<FullOrganization | null, FullOrganization | null>;
|
|
20
189
|
};
|
|
@@ -11,7 +11,25 @@
|
|
|
11
11
|
*/
|
|
12
12
|
declare const _default: import("h3").EventHandler<import("h3").EventHandlerRequest, Promise<{
|
|
13
13
|
success: boolean;
|
|
14
|
-
user:
|
|
15
|
-
|
|
14
|
+
user: import("better-auth").StripEmptyObjects<{
|
|
15
|
+
id: string;
|
|
16
|
+
createdAt: Date;
|
|
17
|
+
updatedAt: Date;
|
|
18
|
+
email: string;
|
|
19
|
+
emailVerified: boolean;
|
|
20
|
+
name: string;
|
|
21
|
+
image?: string | null | undefined;
|
|
22
|
+
} & {
|
|
23
|
+
twoFactorEnabled: boolean | null | undefined;
|
|
24
|
+
} & {
|
|
25
|
+
banned: boolean | null | undefined;
|
|
26
|
+
} & {
|
|
27
|
+
role?: string | null | undefined;
|
|
28
|
+
banReason?: string | null | undefined;
|
|
29
|
+
banExpires?: Date | null | undefined;
|
|
30
|
+
} & {
|
|
31
|
+
lastActiveAt?: Date | null | undefined;
|
|
32
|
+
}>;
|
|
33
|
+
organization: import("@meistrari/auth-core").FullOrganization;
|
|
16
34
|
}>>;
|
|
17
35
|
export default _default;
|
|
@@ -12,7 +12,25 @@
|
|
|
12
12
|
*/
|
|
13
13
|
declare const _default: import("h3").EventHandler<import("h3").EventHandlerRequest, Promise<{
|
|
14
14
|
success: boolean;
|
|
15
|
-
user:
|
|
16
|
-
|
|
15
|
+
user: import("better-auth").StripEmptyObjects<{
|
|
16
|
+
id: string;
|
|
17
|
+
createdAt: Date;
|
|
18
|
+
updatedAt: Date;
|
|
19
|
+
email: string;
|
|
20
|
+
emailVerified: boolean;
|
|
21
|
+
name: string;
|
|
22
|
+
image?: string | null | undefined;
|
|
23
|
+
} & {
|
|
24
|
+
twoFactorEnabled: boolean | null | undefined;
|
|
25
|
+
} & {
|
|
26
|
+
banned: boolean | null | undefined;
|
|
27
|
+
} & {
|
|
28
|
+
role?: string | null | undefined;
|
|
29
|
+
banReason?: string | null | undefined;
|
|
30
|
+
banExpires?: Date | null | undefined;
|
|
31
|
+
} & {
|
|
32
|
+
lastActiveAt?: Date | null | undefined;
|
|
33
|
+
}>;
|
|
34
|
+
organization: import("@meistrari/auth-core").FullOrganization;
|
|
17
35
|
}>>;
|
|
18
36
|
export default _default;
|
|
@@ -1,6 +1,24 @@
|
|
|
1
1
|
declare const _default: import("h3").EventHandler<import("h3").EventHandlerRequest, Promise<{
|
|
2
2
|
success: boolean;
|
|
3
|
-
user:
|
|
4
|
-
|
|
3
|
+
user: import("better-auth").StripEmptyObjects<{
|
|
4
|
+
id: string;
|
|
5
|
+
createdAt: Date;
|
|
6
|
+
updatedAt: Date;
|
|
7
|
+
email: string;
|
|
8
|
+
emailVerified: boolean;
|
|
9
|
+
name: string;
|
|
10
|
+
image?: string | null | undefined;
|
|
11
|
+
} & {
|
|
12
|
+
twoFactorEnabled: boolean | null | undefined;
|
|
13
|
+
} & {
|
|
14
|
+
banned: boolean | null | undefined;
|
|
15
|
+
} & {
|
|
16
|
+
role?: string | null | undefined;
|
|
17
|
+
banReason?: string | null | undefined;
|
|
18
|
+
banExpires?: Date | null | undefined;
|
|
19
|
+
} & {
|
|
20
|
+
lastActiveAt?: Date | null | undefined;
|
|
21
|
+
}>;
|
|
22
|
+
organization: import("@meistrari/auth-core").FullOrganization;
|
|
5
23
|
}>>;
|
|
6
24
|
export default _default;
|
package/dist/runtime/shared.d.ts
CHANGED
|
@@ -1 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
import { AuthClient } from '@meistrari/auth-core';
|
|
2
|
+
export declare function createNuxtAuthClient(apiUrl: string, getAuthToken: () => string | null, getRefreshToken?: () => string | null): AuthClient;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@meistrari/auth-nuxt",
|
|
3
|
-
"version": "3.0.
|
|
3
|
+
"version": "3.0.5",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"exports": {
|
|
6
6
|
".": {
|
|
@@ -11,6 +11,10 @@
|
|
|
11
11
|
"types": "./dist/runtime/server/middleware/auth.d.ts",
|
|
12
12
|
"import": "./dist/runtime/server/middleware/auth.js"
|
|
13
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
|
+
},
|
|
14
18
|
"./core": {
|
|
15
19
|
"types": "./dist/core.d.mts",
|
|
16
20
|
"import": "./dist/core.mjs"
|
|
@@ -27,12 +31,9 @@
|
|
|
27
31
|
"files": [
|
|
28
32
|
"dist"
|
|
29
33
|
],
|
|
30
|
-
"scripts": {
|
|
31
|
-
"build": "nuxt-module-build build --stub && nuxt-module-build prepare && nuxt-module-build build"
|
|
32
|
-
},
|
|
33
34
|
"dependencies": {
|
|
34
|
-
"
|
|
35
|
-
"
|
|
35
|
+
"jose": "6.1.3",
|
|
36
|
+
"@meistrari/auth-core": "1.11.6"
|
|
36
37
|
},
|
|
37
38
|
"peerDependencies": {
|
|
38
39
|
"nuxt": "^3.0.0 || ^4.0.0",
|
|
@@ -52,5 +53,8 @@
|
|
|
52
53
|
"unbuild": "3.6.1",
|
|
53
54
|
"vitest": "3.2.4",
|
|
54
55
|
"vue-tsc": "3.0.6"
|
|
56
|
+
},
|
|
57
|
+
"scripts": {
|
|
58
|
+
"build": "nuxt-module-build build --stub && nuxt-module-build prepare && nuxt-module-build build"
|
|
55
59
|
}
|
|
56
|
-
}
|
|
60
|
+
}
|