@braedonsaunders/appkit-auth 0.1.3
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/LICENSE +661 -0
- package/README.md +36 -0
- package/client.d.ts +129 -0
- package/client.d.ts.map +1 -0
- package/client.js +10 -0
- package/client.js.map +1 -0
- package/drizzle.d.ts +23 -0
- package/drizzle.d.ts.map +1 -0
- package/drizzle.js +66 -0
- package/drizzle.js.map +1 -0
- package/index.d.ts +4 -0
- package/index.d.ts.map +1 -0
- package/index.js +3 -0
- package/index.js.map +1 -0
- package/invites.d.ts +79 -0
- package/invites.d.ts.map +1 -0
- package/invites.js +185 -0
- package/invites.js.map +1 -0
- package/mail.d.ts +36 -0
- package/mail.d.ts.map +1 -0
- package/mail.js +32 -0
- package/mail.js.map +1 -0
- package/memory.d.ts +7 -0
- package/memory.d.ts.map +1 -0
- package/memory.js +24 -0
- package/memory.js.map +1 -0
- package/next.d.ts +2 -0
- package/next.d.ts.map +1 -0
- package/next.js +2 -0
- package/next.js.map +1 -0
- package/package.json +81 -0
- package/react.d.ts +74 -0
- package/react.d.ts.map +1 -0
- package/react.js +129 -0
- package/react.js.map +1 -0
- package/server.d.ts +510 -0
- package/server.d.ts.map +1 -0
- package/server.js +191 -0
- package/server.js.map +1 -0
package/server.d.ts
ADDED
|
@@ -0,0 +1,510 @@
|
|
|
1
|
+
import { betterAuth } from 'better-auth';
|
|
2
|
+
import type { AuthEmailRenderer, AuthEmailSender } from './mail.js';
|
|
3
|
+
import type { InviteService } from './invites.js';
|
|
4
|
+
type BetterAuthOptions = Parameters<typeof betterAuth>[0];
|
|
5
|
+
export type AppkitAuthOptions = {
|
|
6
|
+
database: NonNullable<BetterAuthOptions['database']>;
|
|
7
|
+
baseURL: string;
|
|
8
|
+
secret: string;
|
|
9
|
+
appName: string;
|
|
10
|
+
sendEmail: AuthEmailSender;
|
|
11
|
+
renderEmail?: AuthEmailRenderer;
|
|
12
|
+
inviteService?: InviteService;
|
|
13
|
+
onInviteAcceptanceError?: (error: unknown) => void;
|
|
14
|
+
trustedOrigins?: BetterAuthOptions['trustedOrigins'];
|
|
15
|
+
session?: {
|
|
16
|
+
expiresIn?: number;
|
|
17
|
+
updateAge?: number;
|
|
18
|
+
cookieCacheMaxAge?: number;
|
|
19
|
+
};
|
|
20
|
+
password?: {
|
|
21
|
+
disableSignUp?: boolean;
|
|
22
|
+
requireEmailVerification?: boolean;
|
|
23
|
+
minLength?: number;
|
|
24
|
+
resetTokenExpiresIn?: number;
|
|
25
|
+
};
|
|
26
|
+
magicLink?: {
|
|
27
|
+
expiresIn?: number;
|
|
28
|
+
disableSignUp?: boolean;
|
|
29
|
+
};
|
|
30
|
+
/** Additional upstream options such as social providers and database hooks. */
|
|
31
|
+
extend?: Omit<BetterAuthOptions, 'database' | 'baseURL' | 'secret' | 'appName' | 'trustedOrigins' | 'user' | 'session' | 'account' | 'verification' | 'emailAndPassword' | 'plugins' | 'hooks' | 'advanced'>;
|
|
32
|
+
};
|
|
33
|
+
/**
|
|
34
|
+
* Complete persisted authentication runtime extracted from the production
|
|
35
|
+
* reference: password sign-in/reset, hashed one-time magic links, invitation
|
|
36
|
+
* activation, durable sessions/accounts/verifications, client-compatible APIs,
|
|
37
|
+
* and optional social-provider extension. Product delivery and domain effects
|
|
38
|
+
* are injected.
|
|
39
|
+
*/
|
|
40
|
+
export declare function createAppkitAuth(options: AppkitAuthOptions): import("better-auth").Auth<{
|
|
41
|
+
database: any;
|
|
42
|
+
baseURL: string;
|
|
43
|
+
secret: string;
|
|
44
|
+
appName: string;
|
|
45
|
+
user: {
|
|
46
|
+
modelName: "users";
|
|
47
|
+
fields: {
|
|
48
|
+
emailVerified: string;
|
|
49
|
+
createdAt: string;
|
|
50
|
+
updatedAt: string;
|
|
51
|
+
};
|
|
52
|
+
additionalFields: {
|
|
53
|
+
timezone: {
|
|
54
|
+
type: "string";
|
|
55
|
+
fieldName: string;
|
|
56
|
+
required: true;
|
|
57
|
+
defaultValue: string;
|
|
58
|
+
};
|
|
59
|
+
isActive: {
|
|
60
|
+
type: "boolean";
|
|
61
|
+
fieldName: string;
|
|
62
|
+
required: true;
|
|
63
|
+
defaultValue: true;
|
|
64
|
+
input: false;
|
|
65
|
+
};
|
|
66
|
+
isSuperAdmin: {
|
|
67
|
+
type: "boolean";
|
|
68
|
+
fieldName: string;
|
|
69
|
+
required: true;
|
|
70
|
+
defaultValue: false;
|
|
71
|
+
input: false;
|
|
72
|
+
};
|
|
73
|
+
};
|
|
74
|
+
};
|
|
75
|
+
session: {
|
|
76
|
+
modelName: "sessions";
|
|
77
|
+
fields: {
|
|
78
|
+
userId: string;
|
|
79
|
+
expiresAt: string;
|
|
80
|
+
ipAddress: string;
|
|
81
|
+
userAgent: string;
|
|
82
|
+
createdAt: string;
|
|
83
|
+
updatedAt: string;
|
|
84
|
+
};
|
|
85
|
+
additionalFields: {
|
|
86
|
+
activeTenantId: {
|
|
87
|
+
type: "string";
|
|
88
|
+
fieldName: string;
|
|
89
|
+
required: false;
|
|
90
|
+
input: false;
|
|
91
|
+
};
|
|
92
|
+
impersonatingUserId: {
|
|
93
|
+
type: "string";
|
|
94
|
+
fieldName: string;
|
|
95
|
+
required: false;
|
|
96
|
+
input: false;
|
|
97
|
+
};
|
|
98
|
+
impersonationTenantId: {
|
|
99
|
+
type: "string";
|
|
100
|
+
fieldName: string;
|
|
101
|
+
required: false;
|
|
102
|
+
input: false;
|
|
103
|
+
};
|
|
104
|
+
impersonationStartedAt: {
|
|
105
|
+
type: "date";
|
|
106
|
+
fieldName: string;
|
|
107
|
+
required: false;
|
|
108
|
+
input: false;
|
|
109
|
+
};
|
|
110
|
+
impersonationExpiresAt: {
|
|
111
|
+
type: "date";
|
|
112
|
+
fieldName: string;
|
|
113
|
+
required: false;
|
|
114
|
+
input: false;
|
|
115
|
+
};
|
|
116
|
+
impersonationReason: {
|
|
117
|
+
type: "string";
|
|
118
|
+
fieldName: string;
|
|
119
|
+
required: false;
|
|
120
|
+
input: false;
|
|
121
|
+
};
|
|
122
|
+
};
|
|
123
|
+
expiresIn: number;
|
|
124
|
+
updateAge: number;
|
|
125
|
+
cookieCache: {
|
|
126
|
+
enabled: true;
|
|
127
|
+
maxAge: number;
|
|
128
|
+
};
|
|
129
|
+
};
|
|
130
|
+
account: {
|
|
131
|
+
modelName: "accounts";
|
|
132
|
+
fields: {
|
|
133
|
+
userId: string;
|
|
134
|
+
accountId: string;
|
|
135
|
+
providerId: string;
|
|
136
|
+
accessToken: string;
|
|
137
|
+
refreshToken: string;
|
|
138
|
+
idToken: string;
|
|
139
|
+
accessTokenExpiresAt: string;
|
|
140
|
+
refreshTokenExpiresAt: string;
|
|
141
|
+
createdAt: string;
|
|
142
|
+
updatedAt: string;
|
|
143
|
+
};
|
|
144
|
+
encryptOAuthTokens: true;
|
|
145
|
+
};
|
|
146
|
+
verification: {
|
|
147
|
+
modelName: "verifications";
|
|
148
|
+
fields: {
|
|
149
|
+
expiresAt: string;
|
|
150
|
+
createdAt: string;
|
|
151
|
+
updatedAt: string;
|
|
152
|
+
};
|
|
153
|
+
};
|
|
154
|
+
advanced: {
|
|
155
|
+
database: {
|
|
156
|
+
generateId: "uuid";
|
|
157
|
+
};
|
|
158
|
+
};
|
|
159
|
+
emailAndPassword: {
|
|
160
|
+
enabled: true;
|
|
161
|
+
disableSignUp: boolean;
|
|
162
|
+
requireEmailVerification: boolean;
|
|
163
|
+
minPasswordLength: number;
|
|
164
|
+
autoSignIn: true;
|
|
165
|
+
resetPasswordTokenExpiresIn: number;
|
|
166
|
+
revokeSessionsOnPasswordReset: true;
|
|
167
|
+
sendResetPassword: ({ user, url }: {
|
|
168
|
+
user: import("better-auth").User;
|
|
169
|
+
url: string;
|
|
170
|
+
token: string;
|
|
171
|
+
}) => Promise<void>;
|
|
172
|
+
};
|
|
173
|
+
plugins: [{
|
|
174
|
+
id: "magic-link";
|
|
175
|
+
version: string;
|
|
176
|
+
endpoints: {
|
|
177
|
+
signInMagicLink: import("better-auth").StrictEndpoint<"/sign-in/magic-link", {
|
|
178
|
+
method: "POST";
|
|
179
|
+
requireHeaders: true;
|
|
180
|
+
body: import("zod").ZodObject<{
|
|
181
|
+
email: import("zod").ZodEmail;
|
|
182
|
+
name: import("zod").ZodOptional<import("zod").ZodString>;
|
|
183
|
+
callbackURL: import("zod").ZodOptional<import("zod").ZodString>;
|
|
184
|
+
newUserCallbackURL: import("zod").ZodOptional<import("zod").ZodString>;
|
|
185
|
+
errorCallbackURL: import("zod").ZodOptional<import("zod").ZodString>;
|
|
186
|
+
metadata: import("zod").ZodOptional<import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodAny>>;
|
|
187
|
+
}, import("zod/v4/core").$strip>;
|
|
188
|
+
metadata: {
|
|
189
|
+
openapi: {
|
|
190
|
+
operationId: string;
|
|
191
|
+
description: string;
|
|
192
|
+
responses: {
|
|
193
|
+
200: {
|
|
194
|
+
description: string;
|
|
195
|
+
content: {
|
|
196
|
+
"application/json": {
|
|
197
|
+
schema: {
|
|
198
|
+
type: "object";
|
|
199
|
+
properties: {
|
|
200
|
+
status: {
|
|
201
|
+
type: string;
|
|
202
|
+
};
|
|
203
|
+
};
|
|
204
|
+
};
|
|
205
|
+
};
|
|
206
|
+
};
|
|
207
|
+
};
|
|
208
|
+
};
|
|
209
|
+
};
|
|
210
|
+
};
|
|
211
|
+
}, {
|
|
212
|
+
status: boolean;
|
|
213
|
+
}>;
|
|
214
|
+
magicLinkVerify: import("better-auth").StrictEndpoint<"/magic-link/verify", {
|
|
215
|
+
method: "GET";
|
|
216
|
+
query: import("zod").ZodObject<{
|
|
217
|
+
token: import("zod").ZodString;
|
|
218
|
+
callbackURL: import("zod").ZodOptional<import("zod").ZodString>;
|
|
219
|
+
errorCallbackURL: import("zod").ZodOptional<import("zod").ZodString>;
|
|
220
|
+
newUserCallbackURL: import("zod").ZodOptional<import("zod").ZodString>;
|
|
221
|
+
}, import("zod/v4/core").$strip>;
|
|
222
|
+
use: ((inputContext: import("better-auth").MiddlewareInputContext<import("better-auth").MiddlewareOptions>) => Promise<void>)[];
|
|
223
|
+
requireHeaders: true;
|
|
224
|
+
metadata: {
|
|
225
|
+
openapi: {
|
|
226
|
+
operationId: string;
|
|
227
|
+
description: string;
|
|
228
|
+
responses: {
|
|
229
|
+
200: {
|
|
230
|
+
description: string;
|
|
231
|
+
content: {
|
|
232
|
+
"application/json": {
|
|
233
|
+
schema: {
|
|
234
|
+
type: "object";
|
|
235
|
+
properties: {
|
|
236
|
+
session: {
|
|
237
|
+
$ref: string;
|
|
238
|
+
};
|
|
239
|
+
user: {
|
|
240
|
+
$ref: string;
|
|
241
|
+
};
|
|
242
|
+
};
|
|
243
|
+
};
|
|
244
|
+
};
|
|
245
|
+
};
|
|
246
|
+
};
|
|
247
|
+
};
|
|
248
|
+
};
|
|
249
|
+
};
|
|
250
|
+
}, {
|
|
251
|
+
token: string;
|
|
252
|
+
user: {
|
|
253
|
+
id: string;
|
|
254
|
+
createdAt: Date;
|
|
255
|
+
updatedAt: Date;
|
|
256
|
+
email: string;
|
|
257
|
+
emailVerified: boolean;
|
|
258
|
+
name: string;
|
|
259
|
+
image?: string | null | undefined;
|
|
260
|
+
};
|
|
261
|
+
session: {
|
|
262
|
+
id: string;
|
|
263
|
+
createdAt: Date;
|
|
264
|
+
updatedAt: Date;
|
|
265
|
+
userId: string;
|
|
266
|
+
expiresAt: Date;
|
|
267
|
+
token: string;
|
|
268
|
+
ipAddress?: string | null | undefined;
|
|
269
|
+
userAgent?: string | null | undefined;
|
|
270
|
+
};
|
|
271
|
+
}>;
|
|
272
|
+
};
|
|
273
|
+
rateLimit: {
|
|
274
|
+
pathMatcher(path: string): boolean;
|
|
275
|
+
window: number;
|
|
276
|
+
max: number;
|
|
277
|
+
}[];
|
|
278
|
+
options: import("better-auth/plugins").MagicLinkOptions;
|
|
279
|
+
}];
|
|
280
|
+
hooks: {
|
|
281
|
+
after: (rawContext: import("better-auth").MiddlewareInputContext<import("better-auth").MiddlewareOptions>) => Promise<{}>;
|
|
282
|
+
};
|
|
283
|
+
trustedOrigins: string[] | ((request?: Request | undefined) => import("better-auth").Awaitable<(string | undefined | null)[]>);
|
|
284
|
+
onAPIError?: {
|
|
285
|
+
throw?: boolean;
|
|
286
|
+
onError?: (error: unknown, ctx: import("better-auth").AuthContext) => void | Promise<void>;
|
|
287
|
+
errorURL?: string;
|
|
288
|
+
customizeDefaultErrorPage?: {
|
|
289
|
+
colors?: {
|
|
290
|
+
background?: string;
|
|
291
|
+
foreground?: string;
|
|
292
|
+
primary?: string;
|
|
293
|
+
primaryForeground?: string;
|
|
294
|
+
mutedForeground?: string;
|
|
295
|
+
border?: string;
|
|
296
|
+
destructive?: string;
|
|
297
|
+
titleBorder?: string;
|
|
298
|
+
titleColor?: string;
|
|
299
|
+
gridColor?: string;
|
|
300
|
+
cardBackground?: string;
|
|
301
|
+
cornerBorder?: string;
|
|
302
|
+
};
|
|
303
|
+
size?: {
|
|
304
|
+
radiusSm?: string;
|
|
305
|
+
radiusMd?: string;
|
|
306
|
+
radiusLg?: string;
|
|
307
|
+
textSm?: string;
|
|
308
|
+
text2xl?: string;
|
|
309
|
+
text4xl?: string;
|
|
310
|
+
text6xl?: string;
|
|
311
|
+
};
|
|
312
|
+
font?: {
|
|
313
|
+
defaultFamily?: string;
|
|
314
|
+
monoFamily?: string;
|
|
315
|
+
};
|
|
316
|
+
disableTitleBorder?: boolean;
|
|
317
|
+
disableCornerDecorations?: boolean;
|
|
318
|
+
disableBackgroundGrid?: boolean;
|
|
319
|
+
};
|
|
320
|
+
} | undefined;
|
|
321
|
+
rateLimit?: import("better-auth").BetterAuthRateLimitOptions | undefined;
|
|
322
|
+
basePath?: string | undefined;
|
|
323
|
+
secrets?: Array<{
|
|
324
|
+
version: number;
|
|
325
|
+
value: string;
|
|
326
|
+
}> | undefined;
|
|
327
|
+
secondaryStorage?: import("better-auth").SecondaryStorage | undefined;
|
|
328
|
+
emailVerification?: {
|
|
329
|
+
sendVerificationEmail?: (data: {
|
|
330
|
+
user: import("better-auth").User;
|
|
331
|
+
url: string;
|
|
332
|
+
token: string;
|
|
333
|
+
}, request?: Request) => Promise<void>;
|
|
334
|
+
sendOnSignUp?: boolean;
|
|
335
|
+
sendOnSignIn?: boolean;
|
|
336
|
+
autoSignInAfterVerification?: boolean;
|
|
337
|
+
expiresIn?: number;
|
|
338
|
+
beforeEmailVerification?: (user: import("better-auth").User, request?: Request) => Promise<void>;
|
|
339
|
+
afterEmailVerification?: (user: import("better-auth").User, request?: Request) => Promise<void>;
|
|
340
|
+
} | undefined;
|
|
341
|
+
socialProviders?: import("better-auth").SocialProviders | undefined;
|
|
342
|
+
logger?: import("better-auth").Logger | undefined;
|
|
343
|
+
databaseHooks?: {
|
|
344
|
+
user?: {
|
|
345
|
+
create?: {
|
|
346
|
+
before?: (user: import("better-auth").User & Record<string, unknown>, context: import("better-auth").GenericEndpointContext | null) => Promise<boolean | void | {
|
|
347
|
+
data: {
|
|
348
|
+
id?: string | undefined;
|
|
349
|
+
createdAt?: Date | undefined;
|
|
350
|
+
updatedAt?: Date | undefined;
|
|
351
|
+
email?: string | undefined;
|
|
352
|
+
emailVerified?: boolean | undefined;
|
|
353
|
+
name?: string | undefined;
|
|
354
|
+
image?: string | null | undefined;
|
|
355
|
+
} & Record<string, any>;
|
|
356
|
+
}>;
|
|
357
|
+
after?: (user: import("better-auth").User & Record<string, unknown>, context: import("better-auth").GenericEndpointContext | null) => Promise<void>;
|
|
358
|
+
};
|
|
359
|
+
update?: {
|
|
360
|
+
before?: (user: Partial<import("better-auth").User> & Record<string, unknown>, context: import("better-auth").GenericEndpointContext | null) => Promise<boolean | void | {
|
|
361
|
+
data: {
|
|
362
|
+
[x: string]: any;
|
|
363
|
+
id?: string | undefined;
|
|
364
|
+
createdAt?: Date | undefined;
|
|
365
|
+
updatedAt?: Date | undefined;
|
|
366
|
+
email?: string | undefined;
|
|
367
|
+
emailVerified?: boolean | undefined;
|
|
368
|
+
name?: string | undefined;
|
|
369
|
+
image?: string | null | undefined;
|
|
370
|
+
};
|
|
371
|
+
}>;
|
|
372
|
+
after?: (user: import("better-auth").User & Record<string, unknown>, context: import("better-auth").GenericEndpointContext | null) => Promise<void>;
|
|
373
|
+
};
|
|
374
|
+
delete?: {
|
|
375
|
+
before?: (user: import("better-auth").User & Record<string, unknown>, context: import("better-auth").GenericEndpointContext | null) => Promise<boolean | void>;
|
|
376
|
+
after?: (user: import("better-auth").User & Record<string, unknown>, context: import("better-auth").GenericEndpointContext | null) => Promise<void>;
|
|
377
|
+
};
|
|
378
|
+
};
|
|
379
|
+
session?: {
|
|
380
|
+
create?: {
|
|
381
|
+
before?: (session: import("better-auth").Session & Record<string, unknown>, context: import("better-auth").GenericEndpointContext | null) => Promise<boolean | void | {
|
|
382
|
+
data: {
|
|
383
|
+
id?: string | undefined;
|
|
384
|
+
createdAt?: Date | undefined;
|
|
385
|
+
updatedAt?: Date | undefined;
|
|
386
|
+
userId?: string | undefined;
|
|
387
|
+
expiresAt?: Date | undefined;
|
|
388
|
+
token?: string | undefined;
|
|
389
|
+
ipAddress?: string | null | undefined;
|
|
390
|
+
userAgent?: string | null | undefined;
|
|
391
|
+
} & Record<string, any>;
|
|
392
|
+
}>;
|
|
393
|
+
after?: (session: import("better-auth").Session & Record<string, unknown>, context: import("better-auth").GenericEndpointContext | null) => Promise<void>;
|
|
394
|
+
};
|
|
395
|
+
update?: {
|
|
396
|
+
before?: (session: Partial<import("better-auth").Session> & Record<string, unknown>, context: import("better-auth").GenericEndpointContext | null) => Promise<boolean | void | {
|
|
397
|
+
data: {
|
|
398
|
+
[x: string]: any;
|
|
399
|
+
id?: string | undefined;
|
|
400
|
+
createdAt?: Date | undefined;
|
|
401
|
+
updatedAt?: Date | undefined;
|
|
402
|
+
userId?: string | undefined;
|
|
403
|
+
expiresAt?: Date | undefined;
|
|
404
|
+
token?: string | undefined;
|
|
405
|
+
ipAddress?: string | null | undefined;
|
|
406
|
+
userAgent?: string | null | undefined;
|
|
407
|
+
};
|
|
408
|
+
}>;
|
|
409
|
+
after?: (session: import("better-auth").Session & Record<string, unknown>, context: import("better-auth").GenericEndpointContext | null) => Promise<void>;
|
|
410
|
+
};
|
|
411
|
+
delete?: {
|
|
412
|
+
before?: (session: import("better-auth").Session & Record<string, unknown>, context: import("better-auth").GenericEndpointContext | null) => Promise<boolean | void>;
|
|
413
|
+
after?: (session: import("better-auth").Session & Record<string, unknown>, context: import("better-auth").GenericEndpointContext | null) => Promise<void>;
|
|
414
|
+
};
|
|
415
|
+
};
|
|
416
|
+
account?: {
|
|
417
|
+
create?: {
|
|
418
|
+
before?: (account: import("better-auth").Account, context: import("better-auth").GenericEndpointContext | null) => Promise<boolean | void | {
|
|
419
|
+
data: {
|
|
420
|
+
id?: string | undefined;
|
|
421
|
+
createdAt?: Date | undefined;
|
|
422
|
+
updatedAt?: Date | undefined;
|
|
423
|
+
providerId?: string | undefined;
|
|
424
|
+
accountId?: string | undefined;
|
|
425
|
+
userId?: string | undefined;
|
|
426
|
+
accessToken?: string | null | undefined;
|
|
427
|
+
refreshToken?: string | null | undefined;
|
|
428
|
+
idToken?: string | null | undefined;
|
|
429
|
+
accessTokenExpiresAt?: Date | null | undefined;
|
|
430
|
+
refreshTokenExpiresAt?: Date | null | undefined;
|
|
431
|
+
scope?: string | null | undefined;
|
|
432
|
+
password?: string | null | undefined;
|
|
433
|
+
} & Record<string, any>;
|
|
434
|
+
}>;
|
|
435
|
+
after?: (account: import("better-auth").Account, context: import("better-auth").GenericEndpointContext | null) => Promise<void>;
|
|
436
|
+
};
|
|
437
|
+
update?: {
|
|
438
|
+
before?: (account: Partial<import("better-auth").Account> & Record<string, unknown>, context: import("better-auth").GenericEndpointContext | null) => Promise<boolean | void | {
|
|
439
|
+
data: {
|
|
440
|
+
[x: string]: any;
|
|
441
|
+
id?: string | undefined;
|
|
442
|
+
createdAt?: Date | undefined;
|
|
443
|
+
updatedAt?: Date | undefined;
|
|
444
|
+
providerId?: string | undefined;
|
|
445
|
+
accountId?: string | undefined;
|
|
446
|
+
userId?: string | undefined;
|
|
447
|
+
accessToken?: string | null | undefined;
|
|
448
|
+
refreshToken?: string | null | undefined;
|
|
449
|
+
idToken?: string | null | undefined;
|
|
450
|
+
accessTokenExpiresAt?: Date | null | undefined;
|
|
451
|
+
refreshTokenExpiresAt?: Date | null | undefined;
|
|
452
|
+
scope?: string | null | undefined;
|
|
453
|
+
password?: string | null | undefined;
|
|
454
|
+
};
|
|
455
|
+
}>;
|
|
456
|
+
after?: (account: import("better-auth").Account & Record<string, unknown>, context: import("better-auth").GenericEndpointContext | null) => Promise<void>;
|
|
457
|
+
};
|
|
458
|
+
delete?: {
|
|
459
|
+
before?: (account: import("better-auth").Account & Record<string, unknown>, context: import("better-auth").GenericEndpointContext | null) => Promise<boolean | void>;
|
|
460
|
+
after?: (account: import("better-auth").Account & Record<string, unknown>, context: import("better-auth").GenericEndpointContext | null) => Promise<void>;
|
|
461
|
+
};
|
|
462
|
+
};
|
|
463
|
+
verification?: {
|
|
464
|
+
create?: {
|
|
465
|
+
before?: (verification: import("better-auth").Verification & Record<string, unknown>, context: import("better-auth").GenericEndpointContext | null) => Promise<boolean | void | {
|
|
466
|
+
data: {
|
|
467
|
+
id?: string | undefined;
|
|
468
|
+
createdAt?: Date | undefined;
|
|
469
|
+
updatedAt?: Date | undefined;
|
|
470
|
+
value?: string | undefined;
|
|
471
|
+
expiresAt?: Date | undefined;
|
|
472
|
+
identifier?: string | undefined;
|
|
473
|
+
} & Record<string, any>;
|
|
474
|
+
}>;
|
|
475
|
+
after?: (verification: import("better-auth").Verification & Record<string, unknown>, context: import("better-auth").GenericEndpointContext | null) => Promise<void>;
|
|
476
|
+
};
|
|
477
|
+
update?: {
|
|
478
|
+
before?: (verification: Partial<import("better-auth").Verification> & Record<string, unknown>, context: import("better-auth").GenericEndpointContext | null) => Promise<boolean | void | {
|
|
479
|
+
data: {
|
|
480
|
+
[x: string]: any;
|
|
481
|
+
id?: string | undefined;
|
|
482
|
+
createdAt?: Date | undefined;
|
|
483
|
+
updatedAt?: Date | undefined;
|
|
484
|
+
value?: string | undefined;
|
|
485
|
+
expiresAt?: Date | undefined;
|
|
486
|
+
identifier?: string | undefined;
|
|
487
|
+
};
|
|
488
|
+
}>;
|
|
489
|
+
after?: (verification: import("better-auth").Verification & Record<string, unknown>, context: import("better-auth").GenericEndpointContext | null) => Promise<void>;
|
|
490
|
+
};
|
|
491
|
+
delete?: {
|
|
492
|
+
before?: (verification: import("better-auth").Verification & Record<string, unknown>, context: import("better-auth").GenericEndpointContext | null) => Promise<boolean | void>;
|
|
493
|
+
after?: (verification: import("better-auth").Verification & Record<string, unknown>, context: import("better-auth").GenericEndpointContext | null) => Promise<void>;
|
|
494
|
+
};
|
|
495
|
+
};
|
|
496
|
+
} | undefined;
|
|
497
|
+
disabledPaths?: string[] | undefined;
|
|
498
|
+
telemetry?: {
|
|
499
|
+
enabled?: boolean;
|
|
500
|
+
debug?: boolean;
|
|
501
|
+
} | undefined;
|
|
502
|
+
experimental?: {
|
|
503
|
+
joins?: boolean;
|
|
504
|
+
};
|
|
505
|
+
}>;
|
|
506
|
+
export type AppkitAuth = ReturnType<typeof createAppkitAuth>;
|
|
507
|
+
/** Lazy singleton pattern used by server runtimes that must import safely at build time. */
|
|
508
|
+
export declare function createLazyAuth(factory: () => AppkitAuth): () => AppkitAuth;
|
|
509
|
+
export {};
|
|
510
|
+
//# sourceMappingURL=server.d.ts.map
|
package/server.d.ts.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../src/server.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAA;AAExC,OAAO,KAAK,EAAE,iBAAiB,EAAE,eAAe,EAAE,MAAM,QAAQ,CAAA;AAEhE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,WAAW,CAAA;AAE9C,KAAK,iBAAiB,GAAG,UAAU,CAAC,OAAO,UAAU,CA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