@witchcraft/nuxt-auth 0.1.3 → 0.1.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/module.mjs +3 -6
- package/dist/runtime/components/ExternalCallback.d.vue.ts +2 -1
- package/dist/runtime/components/ExternalCallback.vue.d.ts +2 -1
- package/dist/runtime/components/ExternalCode.d.vue.ts +2 -1
- package/dist/runtime/components/ExternalCode.vue.d.ts +2 -1
- package/dist/runtime/components/LoginProviderButtons.client.d.vue.ts +4 -3
- package/dist/runtime/components/LoginProviderButtons.client.vue.d.ts +4 -3
- package/dist/runtime/components/Mocker.d.vue.ts +2 -1
- package/dist/runtime/components/Mocker.vue.d.ts +2 -1
- package/dist/runtime/components/SessionStatus.d.vue.ts +4 -3
- package/dist/runtime/components/SessionStatus.vue.d.ts +4 -3
- package/dist/runtime/components/UserRegistration.d.vue.ts +3 -2
- package/dist/runtime/components/UserRegistration.vue.d.ts +3 -2
- package/dist/runtime/core/providerStyles.d.ts +1 -1
- package/dist/runtime/core/providers/github.d.ts +1 -1
- package/dist/runtime/core/providers/google.d.ts +1 -1
- package/dist/runtime/server/utils/Auth.d.ts +3 -3
- package/dist/runtime/server/utils/Auth.js +3 -0
- package/dist/runtime/server/utils/SessionManager.d.ts +2 -2
- package/dist/runtime/server/utils/createAuthHandler.d.ts +3 -3
- package/dist/runtime/server/utils/createAuthMiddleware.d.ts +2 -2
- package/dist/runtime/types.d.ts +5 -5
- package/dist/runtime/utils/getAuthApiRoute.d.ts +1 -1
- package/package.json +3 -3
package/dist/module.json
CHANGED
package/dist/module.mjs
CHANGED
|
@@ -3,7 +3,7 @@ import { defineNuxtModule, useLogger, createResolver, addComponentsDir, addImpor
|
|
|
3
3
|
import { defu } from 'defu';
|
|
4
4
|
|
|
5
5
|
const dependencies = {
|
|
6
|
-
"@witchcraft/ui": "^0.3.
|
|
6
|
+
"@witchcraft/ui": "^0.3.2",
|
|
7
7
|
"nuxt-security": "^2.4.0"};
|
|
8
8
|
const pkg = {
|
|
9
9
|
dependencies: dependencies};
|
|
@@ -74,11 +74,8 @@ const module = defineNuxtModule({
|
|
|
74
74
|
prefix: "Auth",
|
|
75
75
|
global: true
|
|
76
76
|
});
|
|
77
|
-
if (!process.env.NUXT_AUTH_SECRET) {
|
|
78
|
-
logger.
|
|
79
|
-
}
|
|
80
|
-
if (process.env.NUXT_AUTH_SECRET && process.env.NUXT_AUTH_SECRET.length === 0) {
|
|
81
|
-
logger.warn("$NUXT_AUTH_SECRET is empty. This is not recommended.");
|
|
77
|
+
if (process.env.NODE_ENV !== "production" && (!process.env.NUXT_AUTH_SECRET || process.env.NUXT_AUTH_SECRET && process.env.NUXT_AUTH_SECRET.length === 0)) {
|
|
78
|
+
logger.warn("$NUXT_AUTH_SECRET is missing or empty. This is not recommended.");
|
|
82
79
|
}
|
|
83
80
|
nuxt.options.runtimeConfig.public.auth = defu(
|
|
84
81
|
nuxt.options.runtimeConfig.public.auth,
|
|
@@ -3,5 +3,6 @@ type __VLS_Props = {
|
|
|
3
3
|
successPath?: string;
|
|
4
4
|
cancelPath?: string;
|
|
5
5
|
};
|
|
6
|
-
declare const
|
|
6
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
7
|
+
declare const _default: typeof __VLS_export;
|
|
7
8
|
export default _default;
|
|
@@ -3,5 +3,6 @@ type __VLS_Props = {
|
|
|
3
3
|
successPath?: string;
|
|
4
4
|
cancelPath?: string;
|
|
5
5
|
};
|
|
6
|
-
declare const
|
|
6
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
7
|
+
declare const _default: typeof __VLS_export;
|
|
7
8
|
export default _default;
|
|
@@ -3,9 +3,10 @@ type __VLS_Props = {
|
|
|
3
3
|
promptText?: string;
|
|
4
4
|
copyTitle?: string;
|
|
5
5
|
};
|
|
6
|
-
declare const
|
|
6
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
|
|
7
7
|
openAppText: string;
|
|
8
8
|
promptText: string;
|
|
9
9
|
copyTitle: string;
|
|
10
10
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
11
|
+
declare const _default: typeof __VLS_export;
|
|
11
12
|
export default _default;
|
|
@@ -3,9 +3,10 @@ type __VLS_Props = {
|
|
|
3
3
|
promptText?: string;
|
|
4
4
|
copyTitle?: string;
|
|
5
5
|
};
|
|
6
|
-
declare const
|
|
6
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
|
|
7
7
|
openAppText: string;
|
|
8
8
|
promptText: string;
|
|
9
9
|
copyTitle: string;
|
|
10
10
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
11
|
+
declare const _default: typeof __VLS_export;
|
|
11
12
|
export default _default;
|
|
@@ -1,15 +1,16 @@
|
|
|
1
|
-
import { useAuth } from "../composables/useAuth.js
|
|
2
|
-
import type { ProviderNames, ProviderStyle, UseAuthComposableOptions } from "../types.js
|
|
1
|
+
import { useAuth } from "../composables/useAuth.js";
|
|
2
|
+
import type { ProviderNames, ProviderStyle, UseAuthComposableOptions } from "../types.js";
|
|
3
3
|
type __VLS_Props = {
|
|
4
4
|
providerStyles?: Record<ProviderNames, Partial<ProviderStyle>>;
|
|
5
5
|
useAuthOptions?: UseAuthComposableOptions;
|
|
6
6
|
loginOptions?: Parameters<ReturnType<typeof useAuth>["login"]>[1];
|
|
7
7
|
};
|
|
8
|
-
declare const
|
|
8
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
|
|
9
9
|
providerStyles: Record<ProviderNames, Partial<ProviderStyle>>;
|
|
10
10
|
useAuthOptions: UseAuthComposableOptions;
|
|
11
11
|
loginOptions: {
|
|
12
12
|
devBypass?: boolean;
|
|
13
13
|
};
|
|
14
14
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
15
|
+
declare const _default: typeof __VLS_export;
|
|
15
16
|
export default _default;
|
|
@@ -1,15 +1,16 @@
|
|
|
1
|
-
import { useAuth } from "../composables/useAuth.js
|
|
2
|
-
import type { ProviderNames, ProviderStyle, UseAuthComposableOptions } from "../types.js
|
|
1
|
+
import { useAuth } from "../composables/useAuth.js";
|
|
2
|
+
import type { ProviderNames, ProviderStyle, UseAuthComposableOptions } from "../types.js";
|
|
3
3
|
type __VLS_Props = {
|
|
4
4
|
providerStyles?: Record<ProviderNames, Partial<ProviderStyle>>;
|
|
5
5
|
useAuthOptions?: UseAuthComposableOptions;
|
|
6
6
|
loginOptions?: Parameters<ReturnType<typeof useAuth>["login"]>[1];
|
|
7
7
|
};
|
|
8
|
-
declare const
|
|
8
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
|
|
9
9
|
providerStyles: Record<ProviderNames, Partial<ProviderStyle>>;
|
|
10
10
|
useAuthOptions: UseAuthComposableOptions;
|
|
11
11
|
loginOptions: {
|
|
12
12
|
devBypass?: boolean;
|
|
13
13
|
};
|
|
14
14
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
15
|
+
declare const _default: typeof __VLS_export;
|
|
15
16
|
export default _default;
|
|
@@ -1,2 +1,3 @@
|
|
|
1
|
-
declare const
|
|
1
|
+
declare const __VLS_export: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
2
|
+
declare const _default: typeof __VLS_export;
|
|
2
3
|
export default _default;
|
|
@@ -1,2 +1,3 @@
|
|
|
1
|
-
declare const
|
|
1
|
+
declare const __VLS_export: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
2
|
+
declare const _default: typeof __VLS_export;
|
|
2
3
|
export default _default;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { AuthUser } from "../types.js
|
|
1
|
+
import type { AuthUser } from "../types.js";
|
|
2
2
|
type __VLS_Props = {
|
|
3
3
|
/** The link to the user's profile. Links to `/users/:username` (note this is not provided by the module). */
|
|
4
4
|
usernameLink?: (user: AuthUser) => string;
|
|
@@ -23,10 +23,11 @@ type __VLS_Slots = {} & {
|
|
|
23
23
|
} & {
|
|
24
24
|
unauthenticated?: (props: typeof __VLS_33) => any;
|
|
25
25
|
};
|
|
26
|
-
declare const
|
|
26
|
+
declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
|
|
27
27
|
usernameLink: (user: AuthUser) => string;
|
|
28
28
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
29
|
-
declare const
|
|
29
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
30
|
+
declare const _default: typeof __VLS_export;
|
|
30
31
|
export default _default;
|
|
31
32
|
type __VLS_WithSlots<T, S> = T & {
|
|
32
33
|
new (): {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { AuthUser } from "../types.js
|
|
1
|
+
import type { AuthUser } from "../types.js";
|
|
2
2
|
type __VLS_Props = {
|
|
3
3
|
/** The link to the user's profile. Links to `/users/:username` (note this is not provided by the module). */
|
|
4
4
|
usernameLink?: (user: AuthUser) => string;
|
|
@@ -23,10 +23,11 @@ type __VLS_Slots = {} & {
|
|
|
23
23
|
} & {
|
|
24
24
|
unauthenticated?: (props: typeof __VLS_33) => any;
|
|
25
25
|
};
|
|
26
|
-
declare const
|
|
26
|
+
declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
|
|
27
27
|
usernameLink: (user: AuthUser) => string;
|
|
28
28
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
29
|
-
declare const
|
|
29
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
30
|
+
declare const _default: typeof __VLS_export;
|
|
30
31
|
export default _default;
|
|
31
32
|
type __VLS_WithSlots<T, S> = T & {
|
|
32
33
|
new (): {
|
|
@@ -21,12 +21,13 @@ type __VLS_Slots = {} & {
|
|
|
21
21
|
} & {
|
|
22
22
|
error?: (props: typeof __VLS_45) => any;
|
|
23
23
|
};
|
|
24
|
-
declare const
|
|
24
|
+
declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
|
|
25
25
|
debounce: number;
|
|
26
26
|
getValidUsernameRoute: (username: string) => string;
|
|
27
27
|
onSubmitRegistration: (event: Event, username: string, error: Ref<string>, redirectUrl: string, deeplink?: string) => void;
|
|
28
28
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
29
|
-
declare const
|
|
29
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
30
|
+
declare const _default: typeof __VLS_export;
|
|
30
31
|
export default _default;
|
|
31
32
|
type __VLS_WithSlots<T, S> = T & {
|
|
32
33
|
new (): {
|
|
@@ -21,12 +21,13 @@ type __VLS_Slots = {} & {
|
|
|
21
21
|
} & {
|
|
22
22
|
error?: (props: typeof __VLS_45) => any;
|
|
23
23
|
};
|
|
24
|
-
declare const
|
|
24
|
+
declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
|
|
25
25
|
debounce: number;
|
|
26
26
|
getValidUsernameRoute: (username: string) => string;
|
|
27
27
|
onSubmitRegistration: (event: Event, username: string, error: Ref<string>, redirectUrl: string, deeplink?: string) => void;
|
|
28
28
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
29
|
-
declare const
|
|
29
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
30
|
+
declare const _default: typeof __VLS_export;
|
|
30
31
|
export default _default;
|
|
31
32
|
type __VLS_WithSlots<T, S> = T & {
|
|
32
33
|
new (): {
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import type { ProviderStyle } from "../types.js
|
|
1
|
+
import type { ProviderStyle } from "../types.js";
|
|
2
2
|
export declare const providerStyles: Record<string, ProviderStyle>;
|
|
@@ -56,7 +56,7 @@ export interface GithubUser {
|
|
|
56
56
|
[k: string]: unknown;
|
|
57
57
|
}
|
|
58
58
|
import { GitHub, type OAuth2Tokens } from "arctic";
|
|
59
|
-
import type { ProviderHandler, ProviderHandlerOptions, ProviderOptions } from "../../types
|
|
59
|
+
import type { ProviderHandler, ProviderHandlerOptions, ProviderOptions } from "../../types";
|
|
60
60
|
export default class GithubProvider implements ProviderHandler<"oauth2", "github", GitHub> {
|
|
61
61
|
name: "github";
|
|
62
62
|
type: "oauth2";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Google, type OAuth2Tokens } from "arctic";
|
|
2
|
-
import type { ProviderHandler, ProviderHandlerOptions, ProviderOptions } from "../../types
|
|
2
|
+
import type { ProviderHandler, ProviderHandlerOptions, ProviderOptions } from "../../types";
|
|
3
3
|
declare module "../../types.js" {
|
|
4
4
|
interface InternalProviders {
|
|
5
5
|
google: GoogleUser;
|
|
@@ -6,9 +6,9 @@ import type { EventHandler, H3Event, Router } from "h3";
|
|
|
6
6
|
import type { JwtPayload } from "jsonwebtoken";
|
|
7
7
|
import type { RuntimeConfig } from "nuxt/schema";
|
|
8
8
|
import { z } from "zod";
|
|
9
|
-
import type { AuthAccountsTable, UserTable } from "./createAuthSchema.js
|
|
10
|
-
import type { SessionManager } from "./SessionManager.js
|
|
11
|
-
import type { AuthOptions, AuthSession, AuthUser, BaseProviderAccountInfo, ProviderHandler, ProviderNames } from "../../types
|
|
9
|
+
import type { AuthAccountsTable, UserTable } from "./createAuthSchema.js";
|
|
10
|
+
import type { SessionManager } from "./SessionManager.js";
|
|
11
|
+
import type { AuthOptions, AuthSession, AuthUser, BaseProviderAccountInfo, ProviderHandler, ProviderNames } from "../../types";
|
|
12
12
|
export declare const zState: z.ZodObject<{
|
|
13
13
|
oauthState: z.ZodString;
|
|
14
14
|
additionalState: z.ZodAny;
|
|
@@ -69,6 +69,9 @@ export class Auth {
|
|
|
69
69
|
providerCookieOpts;
|
|
70
70
|
constructor(runtimeConfig, db, usersTable, authAccountsTable, sessionManager, router, opts, env, logger) {
|
|
71
71
|
this.rc = runtimeConfig;
|
|
72
|
+
if (!import.meta.dev && !(this.rc.authSecret || this.rc.authSecret.length === 0)) {
|
|
73
|
+
throw new Error("FATAL: Missing or empty runtimeConfig.authSecret (i.e. should be set via NUXT_AUTH_SECRET) in production.");
|
|
74
|
+
}
|
|
72
75
|
this.providerCookieOpts = {
|
|
73
76
|
secure: this.rc.public.auth.isSecure,
|
|
74
77
|
...this.rc.public.auth.providerCookieOpts
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import type { DeepPartial } from "@alanscodelog/utils";
|
|
2
2
|
import type { PgDatabase } from "drizzle-orm/pg-core";
|
|
3
3
|
import type { RuntimeConfig } from "nuxt/schema";
|
|
4
|
-
import type { AuthSessionsTable, AuthUsersTable } from "./createAuthSchema.js
|
|
5
|
-
import type { AuthSession, SessionCookie, SessionCookieOptions, SessionValidationResult } from "../../types.js
|
|
4
|
+
import type { AuthSessionsTable, AuthUsersTable } from "./createAuthSchema.js";
|
|
5
|
+
import type { AuthSession, SessionCookie, SessionCookieOptions, SessionValidationResult } from "../../types.js";
|
|
6
6
|
export declare const defaultSessionCookieName = "authSession";
|
|
7
7
|
export declare class SessionManager {
|
|
8
8
|
options: {
|
|
@@ -2,7 +2,7 @@ import type { BaseLogger } from "@witchcraft/nuxt-logger/createUseLogger";
|
|
|
2
2
|
import type { PgDatabase } from "drizzle-orm/pg-core";
|
|
3
3
|
import type { EventHandler } from "h3";
|
|
4
4
|
import type { RuntimeConfig } from "nuxt/schema";
|
|
5
|
-
import type { AuthAccountsTable, UserTable } from "./createAuthSchema.js
|
|
6
|
-
import type { SessionManager } from "./SessionManager.js
|
|
7
|
-
import type { AuthHandlerOptions } from "../../types.js
|
|
5
|
+
import type { AuthAccountsTable, UserTable } from "./createAuthSchema.js";
|
|
6
|
+
import type { SessionManager } from "./SessionManager.js";
|
|
7
|
+
import type { AuthHandlerOptions } from "../../types.js";
|
|
8
8
|
export declare function createAuthHandler(rc: RuntimeConfig, db: PgDatabase<any, any, any>, usersTable: UserTable, authAccountsTable: AuthAccountsTable, sessionManager: SessionManager, logger: BaseLogger, opts?: Partial<AuthHandlerOptions>): EventHandler;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { BaseLogger } from "@witchcraft/nuxt-logger/createUseLogger";
|
|
2
|
-
import type { SessionManager } from "./SessionManager.js
|
|
3
|
-
import type { AuthSession, AuthUser } from "../../types.js
|
|
2
|
+
import type { SessionManager } from "./SessionManager.js";
|
|
3
|
+
import type { AuthSession, AuthUser } from "../../types.js";
|
|
4
4
|
export declare function createAuthMiddleware(sessionManager: SessionManager, logger: BaseLogger): any;
|
|
5
5
|
declare module "h3" {
|
|
6
6
|
interface H3EventContext {
|
package/dist/runtime/types.d.ts
CHANGED
|
@@ -4,10 +4,10 @@ import type { H3Event, Router } from "h3";
|
|
|
4
4
|
import type { StringValue } from "ms";
|
|
5
5
|
import type { InjectionKey } from "vue";
|
|
6
6
|
import { z } from "zod";
|
|
7
|
-
import "./core/providers/github.js
|
|
8
|
-
import "./core/providers/google.js
|
|
9
|
-
import type { AuthAccount, AuthSession as DbAuthSession, AuthUserFields as DbAuthUser } from "./server/utils/createAuthSchema.js
|
|
10
|
-
import type { ModulePublicRuntimeConfig } from "../module.js
|
|
7
|
+
import "./core/providers/github.js";
|
|
8
|
+
import "./core/providers/google.js";
|
|
9
|
+
import type { AuthAccount, AuthSession as DbAuthSession, AuthUserFields as DbAuthUser } from "./server/utils/createAuthSchema.js";
|
|
10
|
+
import type { ModulePublicRuntimeConfig } from "../module.js";
|
|
11
11
|
export type * from "./server/utils/createAuthSchema.js";
|
|
12
12
|
/**
|
|
13
13
|
* This is the minimum information providers need to return.
|
|
@@ -120,7 +120,7 @@ export type ProviderOptions<TProviderName extends ProviderNames = ProviderNames,
|
|
|
120
120
|
*
|
|
121
121
|
* You can type the return by declaration merging with the `AuthExtendedUserInfo` interface.
|
|
122
122
|
*
|
|
123
|
-
* This is set only once per provider account creation and
|
|
123
|
+
* This is set only once per provider account creation and the info column can just be cleared after the information is no longer needed.
|
|
124
124
|
*/
|
|
125
125
|
getAdditionalAccountInfo?: (user: TProviderAccountInfo) => Promise<AdditionalAccountInfo>;
|
|
126
126
|
};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import type { PublicRuntimeConfig } from "@nuxt/schema";
|
|
2
|
-
import type { ApiRoutesParams } from "../../module.js
|
|
2
|
+
import type { ApiRoutesParams } from "../../module.js";
|
|
3
3
|
export declare function getAuthApiRoute<T extends keyof PublicRuntimeConfig["auth"]["authApiRoutes"], TParams extends T extends keyof ApiRoutesParams ? ApiRoutesParams[T] : never>(rc: PublicRuntimeConfig, route: T, params?: TParams, queryParams?: Record<string, any>): string;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@witchcraft/nuxt-auth",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.5",
|
|
4
4
|
"description": "Nuxt module for logging.",
|
|
5
5
|
"repository": "witchcraftjs/nuxt-auth",
|
|
6
6
|
"license": "MIT",
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
"dist"
|
|
25
25
|
],
|
|
26
26
|
"scripts": {
|
|
27
|
-
"prepare": "husky && cd playground && pnpm i",
|
|
27
|
+
"prepare": "husky && pnpm nuxt-module-build prepare && pnpm build:only && cd playground && pnpm i --ignore-scripts --ignore-workspace",
|
|
28
28
|
"build": "cross-env-shell DISABLE_POSTGRES_ENSURE_ENV=true 'nuxt-module-build prepare && nuxt-module-build build && pnpm nuxi build playground'",
|
|
29
29
|
"build:only": "nuxt-module-build build",
|
|
30
30
|
"//": "drizzle requires we run from playground",
|
|
@@ -52,7 +52,7 @@
|
|
|
52
52
|
"@oslojs/encoding": "^1.1.0",
|
|
53
53
|
"@vueuse/core": "^13.9.0",
|
|
54
54
|
"@witchcraft/nuxt-logger": "^0.0.2",
|
|
55
|
-
"@witchcraft/ui": "^0.3.
|
|
55
|
+
"@witchcraft/ui": "^0.3.2",
|
|
56
56
|
"arctic": "~3.7.0",
|
|
57
57
|
"cookie-es": "^2.0.0",
|
|
58
58
|
"defu": "latest",
|