@witchcraft/nuxt-auth 0.3.0 → 0.3.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 +1 -1
- package/dist/runtime/components/SessionStatus.d.vue.ts +30 -6
- package/dist/runtime/components/SessionStatus.vue.d.ts +30 -6
- package/dist/runtime/components/UserRegistration.d.vue.ts +2 -2
- package/dist/runtime/components/UserRegistration.vue.d.ts +2 -2
- package/dist/runtime/composables/useAuth.d.ts +2 -2
- package/dist/runtime/composables/useAuth.js +2 -2
- package/dist/runtime/server/utils/Auth.d.ts +1 -1
- package/dist/runtime/server/utils/createAuthHandler.d.ts +1 -1
- package/dist/runtime/server/utils/createAuthMiddleware.d.ts +1 -1
- package/package.json +6 -6
package/dist/module.json
CHANGED
|
@@ -4,15 +4,39 @@ type __VLS_Props = {
|
|
|
4
4
|
usernameLink?: (user: AuthUser) => string;
|
|
5
5
|
};
|
|
6
6
|
declare var __VLS_1: {
|
|
7
|
-
user:
|
|
8
|
-
authRoutes:
|
|
7
|
+
user: AuthUser;
|
|
8
|
+
authRoutes: {
|
|
9
|
+
login: string | undefined;
|
|
10
|
+
unauthenticated?: string | undefined;
|
|
11
|
+
register?: string | undefined;
|
|
12
|
+
postRegisteredLogin?: string | undefined;
|
|
13
|
+
externalCode?: string | undefined;
|
|
14
|
+
deeplink?: string | undefined;
|
|
15
|
+
mockAuth?: string | undefined;
|
|
16
|
+
};
|
|
9
17
|
}, __VLS_3: {
|
|
10
|
-
user:
|
|
18
|
+
user: AuthUser;
|
|
11
19
|
}, __VLS_19: {
|
|
12
|
-
user:
|
|
13
|
-
authRoutes:
|
|
20
|
+
user: AuthUser;
|
|
21
|
+
authRoutes: {
|
|
22
|
+
login: string | undefined;
|
|
23
|
+
unauthenticated?: string | undefined;
|
|
24
|
+
register?: string | undefined;
|
|
25
|
+
postRegisteredLogin?: string | undefined;
|
|
26
|
+
externalCode?: string | undefined;
|
|
27
|
+
deeplink?: string | undefined;
|
|
28
|
+
mockAuth?: string | undefined;
|
|
29
|
+
};
|
|
14
30
|
}, __VLS_35: {
|
|
15
|
-
authRoutes:
|
|
31
|
+
authRoutes: {
|
|
32
|
+
login: string | undefined;
|
|
33
|
+
unauthenticated?: string | undefined;
|
|
34
|
+
register?: string | undefined;
|
|
35
|
+
postRegisteredLogin?: string | undefined;
|
|
36
|
+
externalCode?: string | undefined;
|
|
37
|
+
deeplink?: string | undefined;
|
|
38
|
+
mockAuth?: string | undefined;
|
|
39
|
+
};
|
|
16
40
|
};
|
|
17
41
|
type __VLS_Slots = {} & {
|
|
18
42
|
'authenticated-registered'?: (props: typeof __VLS_1) => any;
|
|
@@ -4,15 +4,39 @@ type __VLS_Props = {
|
|
|
4
4
|
usernameLink?: (user: AuthUser) => string;
|
|
5
5
|
};
|
|
6
6
|
declare var __VLS_1: {
|
|
7
|
-
user:
|
|
8
|
-
authRoutes:
|
|
7
|
+
user: AuthUser;
|
|
8
|
+
authRoutes: {
|
|
9
|
+
login: string | undefined;
|
|
10
|
+
unauthenticated?: string | undefined;
|
|
11
|
+
register?: string | undefined;
|
|
12
|
+
postRegisteredLogin?: string | undefined;
|
|
13
|
+
externalCode?: string | undefined;
|
|
14
|
+
deeplink?: string | undefined;
|
|
15
|
+
mockAuth?: string | undefined;
|
|
16
|
+
};
|
|
9
17
|
}, __VLS_3: {
|
|
10
|
-
user:
|
|
18
|
+
user: AuthUser;
|
|
11
19
|
}, __VLS_19: {
|
|
12
|
-
user:
|
|
13
|
-
authRoutes:
|
|
20
|
+
user: AuthUser;
|
|
21
|
+
authRoutes: {
|
|
22
|
+
login: string | undefined;
|
|
23
|
+
unauthenticated?: string | undefined;
|
|
24
|
+
register?: string | undefined;
|
|
25
|
+
postRegisteredLogin?: string | undefined;
|
|
26
|
+
externalCode?: string | undefined;
|
|
27
|
+
deeplink?: string | undefined;
|
|
28
|
+
mockAuth?: string | undefined;
|
|
29
|
+
};
|
|
14
30
|
}, __VLS_35: {
|
|
15
|
-
authRoutes:
|
|
31
|
+
authRoutes: {
|
|
32
|
+
login: string | undefined;
|
|
33
|
+
unauthenticated?: string | undefined;
|
|
34
|
+
register?: string | undefined;
|
|
35
|
+
postRegisteredLogin?: string | undefined;
|
|
36
|
+
externalCode?: string | undefined;
|
|
37
|
+
deeplink?: string | undefined;
|
|
38
|
+
mockAuth?: string | undefined;
|
|
39
|
+
};
|
|
16
40
|
};
|
|
17
41
|
type __VLS_Slots = {} & {
|
|
18
42
|
'authenticated-registered'?: (props: typeof __VLS_1) => any;
|
|
@@ -7,8 +7,8 @@ type __VLS_Props = {
|
|
|
7
7
|
id?: string;
|
|
8
8
|
};
|
|
9
9
|
declare var __VLS_20: {}, __VLS_27: {}, __VLS_34: {}, __VLS_41: {}, __VLS_49: {
|
|
10
|
-
error:
|
|
11
|
-
registrationError:
|
|
10
|
+
error: import("nuxt/app").NuxtError<unknown> | undefined;
|
|
11
|
+
registrationError: string;
|
|
12
12
|
};
|
|
13
13
|
type __VLS_Slots = {} & {
|
|
14
14
|
'username-icon-loading'?: (props: typeof __VLS_20) => any;
|
|
@@ -7,8 +7,8 @@ type __VLS_Props = {
|
|
|
7
7
|
id?: string;
|
|
8
8
|
};
|
|
9
9
|
declare var __VLS_20: {}, __VLS_27: {}, __VLS_34: {}, __VLS_41: {}, __VLS_49: {
|
|
10
|
-
error:
|
|
11
|
-
registrationError:
|
|
10
|
+
error: import("nuxt/app").NuxtError<unknown> | undefined;
|
|
11
|
+
registrationError: string;
|
|
12
12
|
};
|
|
13
13
|
type __VLS_Slots = {} & {
|
|
14
14
|
'username-icon-loading'?: (props: typeof __VLS_20) => any;
|
|
@@ -2,8 +2,8 @@ import type { AuthUser, ProviderNames, UseAuthComposableOptions } from "../types
|
|
|
2
2
|
type AuthListenerHook = () => void;
|
|
3
3
|
type AuthListenerHooks = "beforeLogout";
|
|
4
4
|
export declare const useAuth: ({ handleActions }?: UseAuthComposableOptions) => {
|
|
5
|
-
on: (hook: AuthListenerHooks, listener: AuthListenerHook) =>
|
|
6
|
-
off: (hook: AuthListenerHooks, listener: AuthListenerHook) =>
|
|
5
|
+
on: (hook: AuthListenerHooks, listener: AuthListenerHook) => void;
|
|
6
|
+
off: (hook: AuthListenerHooks, listener: AuthListenerHook) => void;
|
|
7
7
|
user: import("vue").Ref<AuthUser | null, AuthUser | null>;
|
|
8
8
|
setFetchUserOnNavigation: (value?: boolean) => void;
|
|
9
9
|
login: (provider: ProviderNames, { devBypass }?: {
|
|
@@ -50,10 +50,10 @@ export const useAuth = ({ handleActions } = {}) => {
|
|
|
50
50
|
}
|
|
51
51
|
}
|
|
52
52
|
}
|
|
53
|
-
|
|
53
|
+
function on(hook, listener) {
|
|
54
54
|
hooks[hook].push(listener);
|
|
55
55
|
}
|
|
56
|
-
|
|
56
|
+
function off(hook, listener) {
|
|
57
57
|
const index = hooks[hook].indexOf(listener);
|
|
58
58
|
if (index > -1) {
|
|
59
59
|
hooks[hook].splice(index, 1);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { BaseLogger } from "@witchcraft/nuxt-logger/
|
|
1
|
+
import type { BaseLogger } from "@witchcraft/nuxt-logger/types";
|
|
2
2
|
import { type OAuth2RequestError, type OAuth2Tokens } from "arctic";
|
|
3
3
|
import type { CookieSerializeOptions } from "cookie-es";
|
|
4
4
|
import type { PgDatabase } from "drizzle-orm/pg-core";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { BaseLogger } from "@witchcraft/nuxt-logger/
|
|
1
|
+
import type { BaseLogger } from "@witchcraft/nuxt-logger/types";
|
|
2
2
|
import type { PgDatabase } from "drizzle-orm/pg-core";
|
|
3
3
|
import type { PgliteDatabase } from "drizzle-orm/pglite";
|
|
4
4
|
import type { EventHandler } from "h3";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { BaseLogger } from "@witchcraft/nuxt-logger/
|
|
1
|
+
import type { BaseLogger } from "@witchcraft/nuxt-logger/types";
|
|
2
2
|
import type { SessionManager } from "./SessionManager.js";
|
|
3
3
|
import type { AuthSession, AuthUser } from "../../types.js";
|
|
4
4
|
export declare function createAuthMiddleware(sessionManager: SessionManager, logger: BaseLogger): import("h3").EventHandler<import("h3").EventHandlerRequest, Promise<void>>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@witchcraft/nuxt-auth",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.1",
|
|
4
4
|
"description": "Nuxt module for logging.",
|
|
5
5
|
"repository": "witchcraftjs/nuxt-auth",
|
|
6
6
|
"license": "MIT",
|
|
@@ -32,16 +32,16 @@
|
|
|
32
32
|
}
|
|
33
33
|
},
|
|
34
34
|
"dependencies": {
|
|
35
|
-
"@alanscodelog/tsconfigs": "^6.
|
|
36
|
-
"@alanscodelog/utils": "^6.0
|
|
35
|
+
"@alanscodelog/tsconfigs": "^6.3.0",
|
|
36
|
+
"@alanscodelog/utils": "^6.2.0",
|
|
37
37
|
"@iconify/json": "^2.2.393",
|
|
38
38
|
"@nuxt/kit": "^4.1.3",
|
|
39
39
|
"@oslojs/crypto": "^1.0.1",
|
|
40
40
|
"@oslojs/encoding": "^1.1.0",
|
|
41
41
|
"@types/jsonwebtoken": "^9.0.10",
|
|
42
42
|
"@vueuse/core": "^13.9.0",
|
|
43
|
-
"@witchcraft/nuxt-logger": "^0.0.
|
|
44
|
-
"@witchcraft/ui": "^0.3.
|
|
43
|
+
"@witchcraft/nuxt-logger": "^0.0.11",
|
|
44
|
+
"@witchcraft/ui": "^0.3.24",
|
|
45
45
|
"arctic": "^3.7.0",
|
|
46
46
|
"cookie-es": "^2.0.0",
|
|
47
47
|
"defu": "^6.1.4",
|
|
@@ -55,7 +55,7 @@
|
|
|
55
55
|
},
|
|
56
56
|
"devDependencies": {
|
|
57
57
|
"@alanscodelog/eslint-config": "^6.3.1",
|
|
58
|
-
"@alanscodelog/semantic-release-config": "^6.0.
|
|
58
|
+
"@alanscodelog/semantic-release-config": "^6.0.2",
|
|
59
59
|
"@commitlint/cli": "^20.1.0",
|
|
60
60
|
"@nuxt/eslint-config": "^1.9.0",
|
|
61
61
|
"@nuxt/module-builder": "^1.0.2",
|