@explita/cloud-auth-client 0.1.3 → 0.2.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/components/login-form.js +1 -2
- package/dist/components/reset-password.js +1 -1
- package/dist/components/signup-form.js +1 -1
- package/dist/contexts/auth-provider.js +37 -36
- package/dist/lib/api-server.js +1 -0
- package/dist/lib/utils.d.ts +2 -2
- package/dist/lib/utils.js +3 -3
- package/dist/server/index.d.ts +1 -0
- package/dist/server/index.js +1 -0
- package/dist/server/server-session.d.ts +2 -8
- package/dist/server/server-session.js +16 -15
- package/dist/server/token-session.d.ts +7 -0
- package/dist/server/token-session.js +36 -0
- package/dist/styles.css +2603 -2645
- package/dist/types.d.ts +23 -0
- package/package.json +2 -1
package/dist/types.d.ts
CHANGED
|
@@ -225,6 +225,29 @@ export type UseTokenRefresherOptions = {
|
|
|
225
225
|
revalidateUserWhenOnline?: () => void;
|
|
226
226
|
config?: AuthConfig;
|
|
227
227
|
};
|
|
228
|
+
export type ServerSession = User & {
|
|
229
|
+
meta: {
|
|
230
|
+
sessionId: string;
|
|
231
|
+
iat: number;
|
|
232
|
+
exp: number;
|
|
233
|
+
};
|
|
234
|
+
};
|
|
235
|
+
export type TokenSession<T extends Record<string, any> = Record<string, any>> = {
|
|
236
|
+
id: string;
|
|
237
|
+
subId: string;
|
|
238
|
+
groupId: string;
|
|
239
|
+
role: {
|
|
240
|
+
label: string;
|
|
241
|
+
permissions: string[];
|
|
242
|
+
};
|
|
243
|
+
isSuperAdmin: boolean;
|
|
244
|
+
metadata: T;
|
|
245
|
+
meta: {
|
|
246
|
+
sessionId: string;
|
|
247
|
+
iat: number;
|
|
248
|
+
exp: number;
|
|
249
|
+
};
|
|
250
|
+
};
|
|
228
251
|
export type QueryOpts = {
|
|
229
252
|
groupIds?: (string | number | null)[];
|
|
230
253
|
};
|
package/package.json
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@explita/cloud-auth-client",
|
|
3
|
-
"version": "0.1
|
|
3
|
+
"version": "0.2.1",
|
|
4
4
|
"author": "Explita",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"description": "A simple authentication library for React",
|
|
7
7
|
"main": "./dist/index.js",
|
|
8
8
|
"types": "./dist/types.d.ts",
|
|
9
|
+
"sideEffects": false,
|
|
9
10
|
"exports": {
|
|
10
11
|
".": {
|
|
11
12
|
"default": "./dist/index.js"
|