@neondatabase/auth 0.1.0-beta.4 → 0.1.0-beta.6
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/{adapter-core-C12KoaiU.d.mts → adapter-core-CTmuBvuA.d.mts} +92 -498
- package/dist/{adapter-core-BDOw-gBC.mjs → adapter-core-FGGtjVtJ.mjs} +2 -4
- package/dist/{better-auth-react-adapter-FnBHa2nr.mjs → better-auth-react-adapter-C-jXL6Ba.mjs} +1 -1
- package/dist/{better-auth-react-adapter-BXL48HIU.d.mts → better-auth-react-adapter-Dx3CfB7p.d.mts} +88 -88
- package/dist/better-auth-types-BSQToNou.d.mts +9 -0
- package/dist/index.d.mts +3 -3
- package/dist/index.mjs +1 -4
- package/dist/{neon-auth-C9XTFffv.mjs → neon-auth-CgnFwwHq.mjs} +1 -1
- package/dist/next/index.d.mts +3 -176
- package/dist/next/index.mjs +3 -9
- package/dist/react/adapters/index.d.mts +3 -3
- package/dist/react/adapters/index.mjs +1 -3
- package/dist/react/index.d.mts +4 -4
- package/dist/react/index.mjs +2 -4
- package/dist/react/ui/index.d.mts +1 -1
- package/dist/react/ui/index.mjs +1 -1
- package/dist/{supabase-adapter-crabDnl2.d.mts → supabase-adapter-CiWRH5H6.d.mts} +1 -2
- package/dist/{supabase-adapter-ggmqWgPe.mjs → supabase-adapter-yCWWsIii.mjs} +45 -123
- package/dist/types/index.d.mts +8 -0
- package/dist/types/index.mjs +3 -0
- package/dist/{ui-BQAaHqx4.mjs → ui-DAV9H8gz.mjs} +27 -12
- package/dist/vanilla/adapters/index.d.mts +3 -3
- package/dist/vanilla/adapters/index.mjs +1 -3
- package/dist/vanilla/index.d.mts +3 -3
- package/dist/vanilla/index.mjs +1 -3
- package/package.json +5 -1
- /package/dist/{adapters-CivF9wql.mjs → adapters-C4sibmzW.mjs} +0 -0
- /package/dist/{adapters-Dkx0zoMR.mjs → adapters-D7Wxk4MT.mjs} +0 -0
- /package/dist/{index-DuDD6cIY.d.mts → index-BFF7W17u.d.mts} +0 -0
- /package/dist/{index-C-svZlpj.d.mts → index-BXxhKmeA.d.mts} +0 -0
- /package/dist/{index-UW23fDSn.d.mts → index-sBeFMSCP.d.mts} +0 -0
package/dist/next/index.d.mts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { n as BetterAuthSession, r as BetterAuthUser } from "../better-auth-types-BSQToNou.mjs";
|
|
1
2
|
import * as better_auth_client0 from "better-auth/client";
|
|
2
3
|
import * as better_auth_client_plugins0 from "better-auth/client/plugins";
|
|
3
4
|
import * as jose0 from "jose";
|
|
@@ -5,7 +6,6 @@ import { NextRequest, NextResponse } from "next/server";
|
|
|
5
6
|
import * as better_auth0 from "better-auth";
|
|
6
7
|
import * as _better_fetch_fetch0 from "@better-fetch/fetch";
|
|
7
8
|
import * as nanostores0 from "nanostores";
|
|
8
|
-
import { Session, User } from "better-auth/types";
|
|
9
9
|
|
|
10
10
|
//#region src/next/handler/index.d.ts
|
|
11
11
|
type Params = {
|
|
@@ -81,10 +81,6 @@ declare function neonAuthMiddleware({
|
|
|
81
81
|
loginUrl
|
|
82
82
|
}: NeonAuthMiddlewareOptions): (request: NextRequest) => Promise<NextResponse<unknown>>;
|
|
83
83
|
//#endregion
|
|
84
|
-
//#region src/core/better-auth-types.d.ts
|
|
85
|
-
type BetterAuthSession = Session;
|
|
86
|
-
type BetterAuthUser = User;
|
|
87
|
-
//#endregion
|
|
88
84
|
//#region src/next/auth/session.d.ts
|
|
89
85
|
type SessionData = {
|
|
90
86
|
session: BetterAuthSession;
|
|
@@ -1334,156 +1330,6 @@ declare function createAuthClient(): {
|
|
|
1334
1330
|
message?: string | undefined;
|
|
1335
1331
|
}, FetchOptions["throw"] extends true ? true : false>>;
|
|
1336
1332
|
};
|
|
1337
|
-
} & {
|
|
1338
|
-
signIn: {
|
|
1339
|
-
phoneNumber: <FetchOptions extends better_auth0.ClientFetchOption<Partial<{
|
|
1340
|
-
phoneNumber: string;
|
|
1341
|
-
password: string;
|
|
1342
|
-
rememberMe?: boolean | undefined;
|
|
1343
|
-
}> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth0.Prettify<{
|
|
1344
|
-
phoneNumber: string;
|
|
1345
|
-
password: string;
|
|
1346
|
-
rememberMe?: boolean | undefined;
|
|
1347
|
-
} & {
|
|
1348
|
-
fetchOptions?: FetchOptions | undefined;
|
|
1349
|
-
}>, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch0.BetterFetchResponse<{
|
|
1350
|
-
token: string;
|
|
1351
|
-
user: better_auth_client_plugins0.UserWithPhoneNumber;
|
|
1352
|
-
}, {
|
|
1353
|
-
code?: string | undefined;
|
|
1354
|
-
message?: string | undefined;
|
|
1355
|
-
}, FetchOptions["throw"] extends true ? true : false>>;
|
|
1356
|
-
};
|
|
1357
|
-
} & {
|
|
1358
|
-
phoneNumber: {
|
|
1359
|
-
sendOtp: <FetchOptions extends better_auth0.ClientFetchOption<Partial<{
|
|
1360
|
-
phoneNumber: string;
|
|
1361
|
-
}> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth0.Prettify<{
|
|
1362
|
-
phoneNumber: string;
|
|
1363
|
-
} & {
|
|
1364
|
-
fetchOptions?: FetchOptions | undefined;
|
|
1365
|
-
}>, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch0.BetterFetchResponse<{
|
|
1366
|
-
message: string;
|
|
1367
|
-
}, {
|
|
1368
|
-
code?: string | undefined;
|
|
1369
|
-
message?: string | undefined;
|
|
1370
|
-
}, FetchOptions["throw"] extends true ? true : false>>;
|
|
1371
|
-
};
|
|
1372
|
-
} & {
|
|
1373
|
-
phoneNumber: {
|
|
1374
|
-
verify: <FetchOptions extends better_auth0.ClientFetchOption<Partial<{
|
|
1375
|
-
phoneNumber: string;
|
|
1376
|
-
code: string;
|
|
1377
|
-
disableSession?: boolean | undefined;
|
|
1378
|
-
updatePhoneNumber?: boolean | undefined;
|
|
1379
|
-
}> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth0.Prettify<{
|
|
1380
|
-
phoneNumber: string;
|
|
1381
|
-
code: string;
|
|
1382
|
-
disableSession?: boolean | undefined;
|
|
1383
|
-
updatePhoneNumber?: boolean | undefined;
|
|
1384
|
-
} & {
|
|
1385
|
-
fetchOptions?: FetchOptions | undefined;
|
|
1386
|
-
}>, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch0.BetterFetchResponse<NonNullable<{
|
|
1387
|
-
status: boolean;
|
|
1388
|
-
token: string;
|
|
1389
|
-
user: better_auth_client_plugins0.UserWithPhoneNumber;
|
|
1390
|
-
} | {
|
|
1391
|
-
status: boolean;
|
|
1392
|
-
token: null;
|
|
1393
|
-
user: better_auth_client_plugins0.UserWithPhoneNumber;
|
|
1394
|
-
}>, {
|
|
1395
|
-
code?: string | undefined;
|
|
1396
|
-
message?: string | undefined;
|
|
1397
|
-
}, FetchOptions["throw"] extends true ? true : false>>;
|
|
1398
|
-
};
|
|
1399
|
-
} & {
|
|
1400
|
-
phoneNumber: {
|
|
1401
|
-
requestPasswordReset: <FetchOptions extends better_auth0.ClientFetchOption<Partial<{
|
|
1402
|
-
phoneNumber: string;
|
|
1403
|
-
}> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth0.Prettify<{
|
|
1404
|
-
phoneNumber: string;
|
|
1405
|
-
} & {
|
|
1406
|
-
fetchOptions?: FetchOptions | undefined;
|
|
1407
|
-
}>, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch0.BetterFetchResponse<{
|
|
1408
|
-
status: boolean;
|
|
1409
|
-
}, {
|
|
1410
|
-
code?: string | undefined;
|
|
1411
|
-
message?: string | undefined;
|
|
1412
|
-
}, FetchOptions["throw"] extends true ? true : false>>;
|
|
1413
|
-
};
|
|
1414
|
-
} & {
|
|
1415
|
-
phoneNumber: {
|
|
1416
|
-
resetPassword: <FetchOptions extends better_auth0.ClientFetchOption<Partial<{
|
|
1417
|
-
otp: string;
|
|
1418
|
-
phoneNumber: string;
|
|
1419
|
-
newPassword: string;
|
|
1420
|
-
}> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth0.Prettify<{
|
|
1421
|
-
otp: string;
|
|
1422
|
-
phoneNumber: string;
|
|
1423
|
-
newPassword: string;
|
|
1424
|
-
} & {
|
|
1425
|
-
fetchOptions?: FetchOptions | undefined;
|
|
1426
|
-
}>, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch0.BetterFetchResponse<{
|
|
1427
|
-
status: boolean;
|
|
1428
|
-
}, {
|
|
1429
|
-
code?: string | undefined;
|
|
1430
|
-
message?: string | undefined;
|
|
1431
|
-
}, FetchOptions["throw"] extends true ? true : false>>;
|
|
1432
|
-
};
|
|
1433
|
-
} & {
|
|
1434
|
-
signIn: {
|
|
1435
|
-
magicLink: <FetchOptions extends better_auth0.ClientFetchOption<Partial<{
|
|
1436
|
-
email: string;
|
|
1437
|
-
name?: string | undefined;
|
|
1438
|
-
callbackURL?: string | undefined;
|
|
1439
|
-
newUserCallbackURL?: string | undefined;
|
|
1440
|
-
errorCallbackURL?: string | undefined;
|
|
1441
|
-
}> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth0.Prettify<{
|
|
1442
|
-
email: string;
|
|
1443
|
-
name?: string | undefined;
|
|
1444
|
-
callbackURL?: string | undefined;
|
|
1445
|
-
newUserCallbackURL?: string | undefined;
|
|
1446
|
-
errorCallbackURL?: string | undefined;
|
|
1447
|
-
} & {
|
|
1448
|
-
fetchOptions?: FetchOptions | undefined;
|
|
1449
|
-
}>, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch0.BetterFetchResponse<{
|
|
1450
|
-
status: boolean;
|
|
1451
|
-
}, {
|
|
1452
|
-
code?: string | undefined;
|
|
1453
|
-
message?: string | undefined;
|
|
1454
|
-
}, FetchOptions["throw"] extends true ? true : false>>;
|
|
1455
|
-
};
|
|
1456
|
-
} & {
|
|
1457
|
-
magicLink: {
|
|
1458
|
-
verify: <FetchOptions extends better_auth0.ClientFetchOption<never, Partial<{
|
|
1459
|
-
token: string;
|
|
1460
|
-
callbackURL?: string | undefined;
|
|
1461
|
-
errorCallbackURL?: string | undefined;
|
|
1462
|
-
newUserCallbackURL?: string | undefined;
|
|
1463
|
-
}> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth0.Prettify<{
|
|
1464
|
-
query: {
|
|
1465
|
-
token: string;
|
|
1466
|
-
callbackURL?: string | undefined;
|
|
1467
|
-
errorCallbackURL?: string | undefined;
|
|
1468
|
-
newUserCallbackURL?: string | undefined;
|
|
1469
|
-
};
|
|
1470
|
-
fetchOptions?: FetchOptions | undefined;
|
|
1471
|
-
}>, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch0.BetterFetchResponse<{
|
|
1472
|
-
token: string;
|
|
1473
|
-
user: {
|
|
1474
|
-
id: string;
|
|
1475
|
-
email: string;
|
|
1476
|
-
emailVerified: boolean;
|
|
1477
|
-
name: string;
|
|
1478
|
-
image: string | null | undefined;
|
|
1479
|
-
createdAt: Date;
|
|
1480
|
-
updatedAt: Date;
|
|
1481
|
-
};
|
|
1482
|
-
}, {
|
|
1483
|
-
code?: string | undefined;
|
|
1484
|
-
message?: string | undefined;
|
|
1485
|
-
}, FetchOptions["throw"] extends true ? true : false>>;
|
|
1486
|
-
};
|
|
1487
1333
|
} & {
|
|
1488
1334
|
signIn: {
|
|
1489
1335
|
social: <FetchOptions extends better_auth0.ClientFetchOption<Partial<{
|
|
@@ -1569,9 +1415,7 @@ declare function createAuthClient(): {
|
|
|
1569
1415
|
image?: string | undefined;
|
|
1570
1416
|
callbackURL?: string | undefined;
|
|
1571
1417
|
fetchOptions?: FetchOptions | undefined;
|
|
1572
|
-
} & {} & {} & {} & {}
|
|
1573
|
-
phoneNumber?: string | null | undefined;
|
|
1574
|
-
}>, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch0.BetterFetchResponse<NonNullable<{
|
|
1418
|
+
} & {} & {} & {} & {}>, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch0.BetterFetchResponse<NonNullable<{
|
|
1575
1419
|
token: null;
|
|
1576
1420
|
user: {
|
|
1577
1421
|
id: string;
|
|
@@ -1727,9 +1571,7 @@ declare function createAuthClient(): {
|
|
|
1727
1571
|
image?: (string | null) | undefined;
|
|
1728
1572
|
name?: string | undefined;
|
|
1729
1573
|
fetchOptions?: FetchOptions | undefined;
|
|
1730
|
-
} & Partial<{} & {} & {} & {}
|
|
1731
|
-
phoneNumber?: string | null | undefined;
|
|
1732
|
-
}>> | undefined, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch0.BetterFetchResponse<{
|
|
1574
|
+
} & Partial<{} & {} & {} & {}>> | undefined, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch0.BetterFetchResponse<{
|
|
1733
1575
|
status: boolean;
|
|
1734
1576
|
}, {
|
|
1735
1577
|
code?: string | undefined;
|
|
@@ -2008,8 +1850,6 @@ declare function createAuthClient(): {
|
|
|
2008
1850
|
banReason?: string | null | undefined;
|
|
2009
1851
|
banExpires?: Date | null | undefined;
|
|
2010
1852
|
isAnonymous: boolean | null | undefined;
|
|
2011
|
-
phoneNumber?: string | null | undefined;
|
|
2012
|
-
phoneNumberVerified?: boolean | null | undefined;
|
|
2013
1853
|
};
|
|
2014
1854
|
session: {
|
|
2015
1855
|
id: string;
|
|
@@ -2169,8 +2009,6 @@ declare function createAuthClient(): {
|
|
|
2169
2009
|
banReason?: string | null | undefined;
|
|
2170
2010
|
banExpires?: Date | null | undefined;
|
|
2171
2011
|
isAnonymous: boolean | null | undefined;
|
|
2172
|
-
phoneNumber?: string | null | undefined;
|
|
2173
|
-
phoneNumberVerified?: boolean | null | undefined;
|
|
2174
2012
|
};
|
|
2175
2013
|
session: {
|
|
2176
2014
|
id: string;
|
|
@@ -2207,8 +2045,6 @@ declare function createAuthClient(): {
|
|
|
2207
2045
|
banReason?: string | null | undefined;
|
|
2208
2046
|
banExpires?: Date | null | undefined;
|
|
2209
2047
|
isAnonymous: boolean | null | undefined;
|
|
2210
|
-
phoneNumber?: string | null | undefined;
|
|
2211
|
-
phoneNumberVerified?: boolean | null | undefined;
|
|
2212
2048
|
};
|
|
2213
2049
|
session: {
|
|
2214
2050
|
id: string;
|
|
@@ -2377,15 +2213,6 @@ declare function createAuthClient(): {
|
|
|
2377
2213
|
readonly INVALID_EMAIL_FORMAT: "Email was not generated in a valid format";
|
|
2378
2214
|
readonly COULD_NOT_CREATE_SESSION: "Could not create session";
|
|
2379
2215
|
readonly ANONYMOUS_USERS_CANNOT_SIGN_IN_AGAIN_ANONYMOUSLY: "Anonymous users cannot sign in again anonymously";
|
|
2380
|
-
readonly INVALID_PHONE_NUMBER: "Invalid phone number";
|
|
2381
|
-
readonly PHONE_NUMBER_EXIST: "Phone number already exists";
|
|
2382
|
-
readonly PHONE_NUMBER_NOT_EXIST: "phone number isn't registered";
|
|
2383
|
-
readonly INVALID_PHONE_NUMBER_OR_PASSWORD: "Invalid phone number or password";
|
|
2384
|
-
readonly UNEXPECTED_ERROR: "Unexpected error";
|
|
2385
|
-
readonly OTP_NOT_FOUND: "OTP not found";
|
|
2386
|
-
readonly PHONE_NUMBER_NOT_VERIFIED: "Phone number not verified";
|
|
2387
|
-
readonly PHONE_NUMBER_CANNOT_BE_UPDATED: "Phone number cannot be updated";
|
|
2388
|
-
readonly SEND_OTP_NOT_IMPLEMENTED: "sendOTP not implemented";
|
|
2389
2216
|
readonly USER_NOT_FOUND: "User not found";
|
|
2390
2217
|
readonly FAILED_TO_CREATE_SESSION: "Failed to create session";
|
|
2391
2218
|
readonly FAILED_TO_UPDATE_USER: "Failed to update user";
|
package/dist/next/index.mjs
CHANGED
|
@@ -1,16 +1,11 @@
|
|
|
1
|
-
import "../adapter-
|
|
2
|
-
import { t as
|
|
3
|
-
import "../supabase-adapter-ggmqWgPe.mjs";
|
|
4
|
-
import { t as createAuthClient$1 } from "../neon-auth-C9XTFffv.mjs";
|
|
1
|
+
import { t as BetterAuthReactAdapter } from "../better-auth-react-adapter-C-jXL6Ba.mjs";
|
|
2
|
+
import { t as createAuthClient$1 } from "../neon-auth-CgnFwwHq.mjs";
|
|
5
3
|
import { parseCookies, parseSetCookieHeader } from "better-auth/cookies";
|
|
6
4
|
import { NextRequest, NextResponse } from "next/server";
|
|
7
5
|
import { cookies, headers } from "next/headers";
|
|
8
6
|
|
|
9
7
|
//#region src/next/errors.ts
|
|
10
|
-
const ERRORS = {
|
|
11
|
-
MISSING_AUTH_BASE_URL: "Missing environment variable: NEON_AUTH_BASE_URL. \n You must provide the auth url of your Neon Auth instance in environment variables",
|
|
12
|
-
NEON_AUTH_MIDDLEWARE_NOT_FOUND: "You are calling `neonAuth` on a route that is not covered by `neonAuthMiddleware`. Make sure it is running on all paths you are calling `neonAuth` from by updating your middleware config in `(middleware|proxy).(js|ts)`."
|
|
13
|
-
};
|
|
8
|
+
const ERRORS = { MISSING_AUTH_BASE_URL: "Missing environment variable: NEON_AUTH_BASE_URL. \n You must provide the auth url of your Neon Auth instance in environment variables" };
|
|
14
9
|
|
|
15
10
|
//#endregion
|
|
16
11
|
//#region src/next/constants.ts
|
|
@@ -236,7 +231,6 @@ const NEON_AUTH_BASE_URL = process.env.NEON_AUTH_BASE_URL;
|
|
|
236
231
|
* ```
|
|
237
232
|
*/
|
|
238
233
|
const neonAuth = async () => {
|
|
239
|
-
if (!(await headers()).has(NEON_AUTH_HEADER_MIDDLEWARE_NAME)) throw new Error(ERRORS.NEON_AUTH_MIDDLEWARE_NOT_FOUND);
|
|
240
234
|
return await fetchSession();
|
|
241
235
|
};
|
|
242
236
|
/**
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import "../../adapter-core-
|
|
2
|
-
import { i as BetterAuthReactAdapterOptions, n as BetterAuthReactAdapterBuilder, r as BetterAuthReactAdapterInstance, t as BetterAuthReactAdapter } from "../../better-auth-react-adapter-
|
|
3
|
-
import "../../index-
|
|
1
|
+
import "../../adapter-core-CTmuBvuA.mjs";
|
|
2
|
+
import { i as BetterAuthReactAdapterOptions, n as BetterAuthReactAdapterBuilder, r as BetterAuthReactAdapterInstance, t as BetterAuthReactAdapter } from "../../better-auth-react-adapter-Dx3CfB7p.mjs";
|
|
3
|
+
import "../../index-sBeFMSCP.mjs";
|
|
4
4
|
export { BetterAuthReactAdapter, BetterAuthReactAdapterBuilder, BetterAuthReactAdapterInstance, BetterAuthReactAdapterOptions };
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
import "../../adapter-
|
|
2
|
-
import { t as BetterAuthReactAdapter } from "../../better-auth-react-adapter-FnBHa2nr.mjs";
|
|
3
|
-
import "../../adapters-Dkx0zoMR.mjs";
|
|
1
|
+
import { t as BetterAuthReactAdapter } from "../../better-auth-react-adapter-C-jXL6Ba.mjs";
|
|
4
2
|
|
|
5
3
|
export { BetterAuthReactAdapter };
|
package/dist/react/index.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import "../adapter-core-
|
|
2
|
-
import { i as BetterAuthReactAdapterOptions, n as BetterAuthReactAdapterBuilder, r as BetterAuthReactAdapterInstance, t as BetterAuthReactAdapter } from "../better-auth-react-adapter-
|
|
3
|
-
import "../index-
|
|
4
|
-
import { $ as MagicLinkFormProps, $t as SignUpFormProps, A as ChangePasswordCard, An as UserViewClassNames, At as PasswordInput, B as DropboxIcon, Bn as socialProviders, Bt as ResetPasswordFormProps, C as AuthUIProviderProps, Cn as UserAvatarClassNames, Ct as OrganizationViewPageProps, D as AuthViewPaths, Dn as UserButtonProps, Dt as OrganizationsCard, E as AuthViewPath, En as UserButtonClassNames, Et as OrganizationViewProps, F as CreateTeamDialogProps, Fn as accountViewPaths, Ft as RecoverAccountFormProps, G as GitLabIcon, Gt as SettingsCard, H as ForgotPasswordForm, Hn as useAuthenticate, Ht as SecuritySettingsCards, I as DeleteAccountCard, In as authLocalization, It as RedditIcon, J as InputFieldSkeleton, Jt as SettingsCellSkeleton, K as GoogleIcon, Kt as SettingsCardClassNames, L as DeleteAccountCardProps, Ln as authViewPaths, Lt as RedirectToSignIn, M as CreateOrganizationDialog, Mn as VKIcon, Mt as ProvidersCard, N as CreateOrganizationDialogProps, Nn as XIcon, Nt as ProvidersCardProps, O as AuthViewProps, On as UserInvitationsCard, Ot as PasskeysCard, P as CreateTeamDialog, Pn as ZoomIcon, Pt as RecoverAccountForm, Q as MagicLinkForm, Qt as SignUpForm, R as DeleteOrganizationCard, Rn as getViewByPath, Rt as RedirectToSignUp, S as AuthUIProvider, Sn as UserAvatar, St as OrganizationViewClassNames, T as AuthViewClassNames, Tn as UserButton, Tt as OrganizationViewPaths, U as ForgotPasswordFormProps, Un as useCurrentOrganization, Ut as SessionsCard, V as FacebookIcon, Vn as useAuthData, Vt as RobloxIcon, W as GitHubIcon, Wn as useTheme, Wt as SessionsCardProps, X as LinearIcon, Xt as SignInFormProps, Y as KickIcon, Yt as SignInForm, Z as LinkedInIcon, Zt as SignOut, _ as AuthLoading, _n as UpdateAvatarCardProps, _t as OrganizationSlugCardProps, a as AccountViewPath, an as TeamCell, at as OrganizationInvitationsCard, b as AuthUIContext, bn as UpdateNameCard, bt as OrganizationSwitcherProps, c as AccountsCard, cn as TeamOptionsContext, ct as OrganizationLogoCardProps, d as AppleIcon, dn as TwitchIcon, dt as OrganizationMembersCard, en as SignedIn, et as MicrosoftIcon, f as AuthCallback, fn as TwoFactorCard, ft as OrganizationNameCard, g as AuthHooks, gn as UpdateAvatarCard, gt as OrganizationSlugCard, h as AuthFormProps, hn as TwoFactorFormProps, ht as OrganizationSettingsCardsProps, i as AccountView, in as Team, it as OrganizationCellView, j as ChangePasswordCardProps, jn as UserViewProps, jt as Provider, k as ChangeEmailCard, kn as UserView, kt as PasskeysCardProps, l as AccountsCardProps, ln as TeamsCard, lt as OrganizationLogoClassNames, m as AuthFormClassNames, mn as TwoFactorForm, mt as OrganizationSettingsCards, n as AcceptInvitationCardProps, nn as SlackIcon, nt as NeonAuthUIProviderProps, o as AccountViewPaths, on as TeamCellProps, ot as OrganizationLogo, p as AuthForm, pn as TwoFactorCardProps, pt as OrganizationNameCardProps, q as HuggingFaceIcon, qt as SettingsCardProps, r as AccountSettingsCards, rn as SpotifyIcon, rt as NotionIcon, s as AccountViewProps, sn as TeamOptions, st as OrganizationLogoCard, t as AcceptInvitationCard, tn as SignedOut, tt as NeonAuthUIProvider, u as ApiKeysCardProps, un as TikTokIcon, ut as OrganizationLogoProps, v as AuthLocalization, vn as UpdateFieldCard, vt as OrganizationSwitcher, w as AuthView, wn as UserAvatarProps, wt as OrganizationViewPath, x as AuthUIContextType, xn as UpdateUsernameCard, xt as OrganizationView, y as AuthMutators, yn as UpdateFieldCardProps, yt as OrganizationSwitcherClassNames, z as DiscordIcon, zn as organizationViewPaths, zt as ResetPasswordForm } from "../index-
|
|
1
|
+
import "../adapter-core-CTmuBvuA.mjs";
|
|
2
|
+
import { i as BetterAuthReactAdapterOptions, n as BetterAuthReactAdapterBuilder, r as BetterAuthReactAdapterInstance, t as BetterAuthReactAdapter } from "../better-auth-react-adapter-Dx3CfB7p.mjs";
|
|
3
|
+
import "../index-sBeFMSCP.mjs";
|
|
4
|
+
import { $ as MagicLinkFormProps, $t as SignUpFormProps, A as ChangePasswordCard, An as UserViewClassNames, At as PasswordInput, B as DropboxIcon, Bn as socialProviders, Bt as ResetPasswordFormProps, C as AuthUIProviderProps, Cn as UserAvatarClassNames, Ct as OrganizationViewPageProps, D as AuthViewPaths, Dn as UserButtonProps, Dt as OrganizationsCard, E as AuthViewPath, En as UserButtonClassNames, Et as OrganizationViewProps, F as CreateTeamDialogProps, Fn as accountViewPaths, Ft as RecoverAccountFormProps, G as GitLabIcon, Gt as SettingsCard, H as ForgotPasswordForm, Hn as useAuthenticate, Ht as SecuritySettingsCards, I as DeleteAccountCard, In as authLocalization, It as RedditIcon, J as InputFieldSkeleton, Jt as SettingsCellSkeleton, K as GoogleIcon, Kt as SettingsCardClassNames, L as DeleteAccountCardProps, Ln as authViewPaths, Lt as RedirectToSignIn, M as CreateOrganizationDialog, Mn as VKIcon, Mt as ProvidersCard, N as CreateOrganizationDialogProps, Nn as XIcon, Nt as ProvidersCardProps, O as AuthViewProps, On as UserInvitationsCard, Ot as PasskeysCard, P as CreateTeamDialog, Pn as ZoomIcon, Pt as RecoverAccountForm, Q as MagicLinkForm, Qt as SignUpForm, R as DeleteOrganizationCard, Rn as getViewByPath, Rt as RedirectToSignUp, S as AuthUIProvider, Sn as UserAvatar, St as OrganizationViewClassNames, T as AuthViewClassNames, Tn as UserButton, Tt as OrganizationViewPaths, U as ForgotPasswordFormProps, Un as useCurrentOrganization, Ut as SessionsCard, V as FacebookIcon, Vn as useAuthData, Vt as RobloxIcon, W as GitHubIcon, Wn as useTheme, Wt as SessionsCardProps, X as LinearIcon, Xt as SignInFormProps, Y as KickIcon, Yt as SignInForm, Z as LinkedInIcon, Zt as SignOut, _ as AuthLoading, _n as UpdateAvatarCardProps, _t as OrganizationSlugCardProps, a as AccountViewPath, an as TeamCell, at as OrganizationInvitationsCard, b as AuthUIContext, bn as UpdateNameCard, bt as OrganizationSwitcherProps, c as AccountsCard, cn as TeamOptionsContext, ct as OrganizationLogoCardProps, d as AppleIcon, dn as TwitchIcon, dt as OrganizationMembersCard, en as SignedIn, et as MicrosoftIcon, f as AuthCallback, fn as TwoFactorCard, ft as OrganizationNameCard, g as AuthHooks, gn as UpdateAvatarCard, gt as OrganizationSlugCard, h as AuthFormProps, hn as TwoFactorFormProps, ht as OrganizationSettingsCardsProps, i as AccountView, in as Team, it as OrganizationCellView, j as ChangePasswordCardProps, jn as UserViewProps, jt as Provider, k as ChangeEmailCard, kn as UserView, kt as PasskeysCardProps, l as AccountsCardProps, ln as TeamsCard, lt as OrganizationLogoClassNames, m as AuthFormClassNames, mn as TwoFactorForm, mt as OrganizationSettingsCards, n as AcceptInvitationCardProps, nn as SlackIcon, nt as NeonAuthUIProviderProps, o as AccountViewPaths, on as TeamCellProps, ot as OrganizationLogo, p as AuthForm, pn as TwoFactorCardProps, pt as OrganizationNameCardProps, q as HuggingFaceIcon, qt as SettingsCardProps, r as AccountSettingsCards, rn as SpotifyIcon, rt as NotionIcon, s as AccountViewProps, sn as TeamOptions, st as OrganizationLogoCard, t as AcceptInvitationCard, tn as SignedOut, tt as NeonAuthUIProvider, u as ApiKeysCardProps, un as TikTokIcon, ut as OrganizationLogoProps, v as AuthLocalization, vn as UpdateFieldCard, vt as OrganizationSwitcher, w as AuthView, wn as UserAvatarProps, wt as OrganizationViewPath, x as AuthUIContextType, xn as UpdateUsernameCard, xt as OrganizationView, y as AuthMutators, yn as UpdateFieldCardProps, yt as OrganizationSwitcherClassNames, z as DiscordIcon, zn as organizationViewPaths, zt as ResetPasswordForm } from "../index-BFF7W17u.mjs";
|
|
5
5
|
export { AcceptInvitationCard, AcceptInvitationCardProps, AccountSettingsCards, AccountView, AccountViewPath, AccountViewPaths, AccountViewProps, AccountsCard, AccountsCardProps, ApiKeysCardProps, AppleIcon, AuthCallback, AuthForm, AuthFormClassNames, AuthFormProps, AuthHooks, AuthLoading, AuthLocalization, AuthMutators, AuthUIContext, AuthUIContextType, AuthUIProvider, AuthUIProviderProps, AuthView, AuthViewClassNames, AuthViewPath, AuthViewPaths, AuthViewProps, BetterAuthReactAdapter, BetterAuthReactAdapterBuilder, BetterAuthReactAdapterInstance, BetterAuthReactAdapterOptions, ChangeEmailCard, ChangePasswordCard, ChangePasswordCardProps, CreateOrganizationDialog, CreateOrganizationDialogProps, CreateTeamDialog, CreateTeamDialogProps, DeleteAccountCard, DeleteAccountCardProps, DeleteOrganizationCard, DiscordIcon, DropboxIcon, FacebookIcon, ForgotPasswordForm, ForgotPasswordFormProps, GitHubIcon, GitLabIcon, GoogleIcon, HuggingFaceIcon, InputFieldSkeleton, KickIcon, LinearIcon, LinkedInIcon, MagicLinkForm, MagicLinkFormProps, MicrosoftIcon, NeonAuthUIProvider, NeonAuthUIProviderProps, NotionIcon, OrganizationCellView, OrganizationInvitationsCard, OrganizationLogo, OrganizationLogoCard, OrganizationLogoCardProps, OrganizationLogoClassNames, OrganizationLogoProps, OrganizationMembersCard, OrganizationNameCard, OrganizationNameCardProps, OrganizationSettingsCards, OrganizationSettingsCardsProps, OrganizationSlugCard, OrganizationSlugCardProps, OrganizationSwitcher, OrganizationSwitcherClassNames, OrganizationSwitcherProps, OrganizationView, OrganizationViewClassNames, OrganizationViewPageProps, OrganizationViewPath, OrganizationViewPaths, OrganizationViewProps, OrganizationsCard, PasskeysCard, PasskeysCardProps, PasswordInput, Provider, ProvidersCard, ProvidersCardProps, RecoverAccountForm, RecoverAccountFormProps, RedditIcon, RedirectToSignIn, RedirectToSignUp, ResetPasswordForm, ResetPasswordFormProps, RobloxIcon, SecuritySettingsCards, SessionsCard, SessionsCardProps, SettingsCard, SettingsCardClassNames, SettingsCardProps, SettingsCellSkeleton, SignInForm, SignInFormProps, SignOut, SignUpForm, SignUpFormProps, SignedIn, SignedOut, SlackIcon, SpotifyIcon, Team, TeamCell, TeamCellProps, TeamOptions, TeamOptionsContext, TeamsCard, TikTokIcon, TwitchIcon, TwoFactorCard, TwoFactorCardProps, TwoFactorForm, TwoFactorFormProps, UpdateAvatarCard, UpdateAvatarCardProps, UpdateFieldCard, UpdateFieldCardProps, UpdateNameCard, UpdateUsernameCard, UserAvatar, UserAvatarClassNames, UserAvatarProps, UserButton, UserButtonClassNames, UserButtonProps, UserInvitationsCard, UserView, UserViewClassNames, UserViewProps, VKIcon, XIcon, ZoomIcon, accountViewPaths, authLocalization, authViewPaths, getViewByPath, organizationViewPaths, socialProviders, useAuthData, useAuthenticate, useCurrentOrganization, useTheme };
|
package/dist/react/index.mjs
CHANGED
|
@@ -1,7 +1,5 @@
|
|
|
1
|
-
import { n as dist_exports, r as useTheme, t as NeonAuthUIProvider } from "../ui-
|
|
2
|
-
import "../adapter-
|
|
3
|
-
import { t as BetterAuthReactAdapter } from "../better-auth-react-adapter-FnBHa2nr.mjs";
|
|
4
|
-
import "../adapters-Dkx0zoMR.mjs";
|
|
1
|
+
import { n as dist_exports, r as useTheme, t as NeonAuthUIProvider } from "../ui-DAV9H8gz.mjs";
|
|
2
|
+
import { t as BetterAuthReactAdapter } from "../better-auth-react-adapter-C-jXL6Ba.mjs";
|
|
5
3
|
|
|
6
4
|
var AcceptInvitationCard = dist_exports.AcceptInvitationCard;
|
|
7
5
|
var AccountSettingsCards = dist_exports.AccountSettingsCards;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
import { $ as MagicLinkFormProps, $t as SignUpFormProps, A as ChangePasswordCard, An as UserViewClassNames, At as PasswordInput, B as DropboxIcon, Bn as socialProviders, Bt as ResetPasswordFormProps, C as AuthUIProviderProps, Cn as UserAvatarClassNames, Ct as OrganizationViewPageProps, D as AuthViewPaths, Dn as UserButtonProps, Dt as OrganizationsCard, E as AuthViewPath, En as UserButtonClassNames, Et as OrganizationViewProps, F as CreateTeamDialogProps, Fn as accountViewPaths, Ft as RecoverAccountFormProps, G as GitLabIcon, Gt as SettingsCard, H as ForgotPasswordForm, Hn as useAuthenticate, Ht as SecuritySettingsCards, I as DeleteAccountCard, In as authLocalization, It as RedditIcon, J as InputFieldSkeleton, Jt as SettingsCellSkeleton, K as GoogleIcon, Kt as SettingsCardClassNames, L as DeleteAccountCardProps, Ln as authViewPaths, Lt as RedirectToSignIn, M as CreateOrganizationDialog, Mn as VKIcon, Mt as ProvidersCard, N as CreateOrganizationDialogProps, Nn as XIcon, Nt as ProvidersCardProps, O as AuthViewProps, On as UserInvitationsCard, Ot as PasskeysCard, P as CreateTeamDialog, Pn as ZoomIcon, Pt as RecoverAccountForm, Q as MagicLinkForm, Qt as SignUpForm, R as DeleteOrganizationCard, Rn as getViewByPath, Rt as RedirectToSignUp, S as AuthUIProvider, Sn as UserAvatar, St as OrganizationViewClassNames, T as AuthViewClassNames, Tn as UserButton, Tt as OrganizationViewPaths, U as ForgotPasswordFormProps, Un as useCurrentOrganization, Ut as SessionsCard, V as FacebookIcon, Vn as useAuthData, Vt as RobloxIcon, W as GitHubIcon, Wn as useTheme, Wt as SessionsCardProps, X as LinearIcon, Xt as SignInFormProps, Y as KickIcon, Yt as SignInForm, Z as LinkedInIcon, Zt as SignOut, _ as AuthLoading, _n as UpdateAvatarCardProps, _t as OrganizationSlugCardProps, a as AccountViewPath, an as TeamCell, at as OrganizationInvitationsCard, b as AuthUIContext, bn as UpdateNameCard, bt as OrganizationSwitcherProps, c as AccountsCard, cn as TeamOptionsContext, ct as OrganizationLogoCardProps, d as AppleIcon, dn as TwitchIcon, dt as OrganizationMembersCard, en as SignedIn, et as MicrosoftIcon, f as AuthCallback, fn as TwoFactorCard, ft as OrganizationNameCard, g as AuthHooks, gn as UpdateAvatarCard, gt as OrganizationSlugCard, h as AuthFormProps, hn as TwoFactorFormProps, ht as OrganizationSettingsCardsProps, i as AccountView, in as Team, it as OrganizationCellView, j as ChangePasswordCardProps, jn as UserViewProps, jt as Provider, k as ChangeEmailCard, kn as UserView, kt as PasskeysCardProps, l as AccountsCardProps, ln as TeamsCard, lt as OrganizationLogoClassNames, m as AuthFormClassNames, mn as TwoFactorForm, mt as OrganizationSettingsCards, n as AcceptInvitationCardProps, nn as SlackIcon, nt as NeonAuthUIProviderProps, o as AccountViewPaths, on as TeamCellProps, ot as OrganizationLogo, p as AuthForm, pn as TwoFactorCardProps, pt as OrganizationNameCardProps, q as HuggingFaceIcon, qt as SettingsCardProps, r as AccountSettingsCards, rn as SpotifyIcon, rt as NotionIcon, s as AccountViewProps, sn as TeamOptions, st as OrganizationLogoCard, t as AcceptInvitationCard, tn as SignedOut, tt as NeonAuthUIProvider, u as ApiKeysCardProps, un as TikTokIcon, ut as OrganizationLogoProps, v as AuthLocalization, vn as UpdateFieldCard, vt as OrganizationSwitcher, w as AuthView, wn as UserAvatarProps, wt as OrganizationViewPath, x as AuthUIContextType, xn as UpdateUsernameCard, xt as OrganizationView, y as AuthMutators, yn as UpdateFieldCardProps, yt as OrganizationSwitcherClassNames, z as DiscordIcon, zn as organizationViewPaths, zt as ResetPasswordForm } from "../../index-
|
|
2
|
+
import { $ as MagicLinkFormProps, $t as SignUpFormProps, A as ChangePasswordCard, An as UserViewClassNames, At as PasswordInput, B as DropboxIcon, Bn as socialProviders, Bt as ResetPasswordFormProps, C as AuthUIProviderProps, Cn as UserAvatarClassNames, Ct as OrganizationViewPageProps, D as AuthViewPaths, Dn as UserButtonProps, Dt as OrganizationsCard, E as AuthViewPath, En as UserButtonClassNames, Et as OrganizationViewProps, F as CreateTeamDialogProps, Fn as accountViewPaths, Ft as RecoverAccountFormProps, G as GitLabIcon, Gt as SettingsCard, H as ForgotPasswordForm, Hn as useAuthenticate, Ht as SecuritySettingsCards, I as DeleteAccountCard, In as authLocalization, It as RedditIcon, J as InputFieldSkeleton, Jt as SettingsCellSkeleton, K as GoogleIcon, Kt as SettingsCardClassNames, L as DeleteAccountCardProps, Ln as authViewPaths, Lt as RedirectToSignIn, M as CreateOrganizationDialog, Mn as VKIcon, Mt as ProvidersCard, N as CreateOrganizationDialogProps, Nn as XIcon, Nt as ProvidersCardProps, O as AuthViewProps, On as UserInvitationsCard, Ot as PasskeysCard, P as CreateTeamDialog, Pn as ZoomIcon, Pt as RecoverAccountForm, Q as MagicLinkForm, Qt as SignUpForm, R as DeleteOrganizationCard, Rn as getViewByPath, Rt as RedirectToSignUp, S as AuthUIProvider, Sn as UserAvatar, St as OrganizationViewClassNames, T as AuthViewClassNames, Tn as UserButton, Tt as OrganizationViewPaths, U as ForgotPasswordFormProps, Un as useCurrentOrganization, Ut as SessionsCard, V as FacebookIcon, Vn as useAuthData, Vt as RobloxIcon, W as GitHubIcon, Wn as useTheme, Wt as SessionsCardProps, X as LinearIcon, Xt as SignInFormProps, Y as KickIcon, Yt as SignInForm, Z as LinkedInIcon, Zt as SignOut, _ as AuthLoading, _n as UpdateAvatarCardProps, _t as OrganizationSlugCardProps, a as AccountViewPath, an as TeamCell, at as OrganizationInvitationsCard, b as AuthUIContext, bn as UpdateNameCard, bt as OrganizationSwitcherProps, c as AccountsCard, cn as TeamOptionsContext, ct as OrganizationLogoCardProps, d as AppleIcon, dn as TwitchIcon, dt as OrganizationMembersCard, en as SignedIn, et as MicrosoftIcon, f as AuthCallback, fn as TwoFactorCard, ft as OrganizationNameCard, g as AuthHooks, gn as UpdateAvatarCard, gt as OrganizationSlugCard, h as AuthFormProps, hn as TwoFactorFormProps, ht as OrganizationSettingsCardsProps, i as AccountView, in as Team, it as OrganizationCellView, j as ChangePasswordCardProps, jn as UserViewProps, jt as Provider, k as ChangeEmailCard, kn as UserView, kt as PasskeysCardProps, l as AccountsCardProps, ln as TeamsCard, lt as OrganizationLogoClassNames, m as AuthFormClassNames, mn as TwoFactorForm, mt as OrganizationSettingsCards, n as AcceptInvitationCardProps, nn as SlackIcon, nt as NeonAuthUIProviderProps, o as AccountViewPaths, on as TeamCellProps, ot as OrganizationLogo, p as AuthForm, pn as TwoFactorCardProps, pt as OrganizationNameCardProps, q as HuggingFaceIcon, qt as SettingsCardProps, r as AccountSettingsCards, rn as SpotifyIcon, rt as NotionIcon, s as AccountViewProps, sn as TeamOptions, st as OrganizationLogoCard, t as AcceptInvitationCard, tn as SignedOut, tt as NeonAuthUIProvider, u as ApiKeysCardProps, un as TikTokIcon, ut as OrganizationLogoProps, v as AuthLocalization, vn as UpdateFieldCard, vt as OrganizationSwitcher, w as AuthView, wn as UserAvatarProps, wt as OrganizationViewPath, x as AuthUIContextType, xn as UpdateUsernameCard, xt as OrganizationView, y as AuthMutators, yn as UpdateFieldCardProps, yt as OrganizationSwitcherClassNames, z as DiscordIcon, zn as organizationViewPaths, zt as ResetPasswordForm } from "../../index-BFF7W17u.mjs";
|
|
3
3
|
export { AcceptInvitationCard, AcceptInvitationCardProps, AccountSettingsCards, AccountView, AccountViewPath, AccountViewPaths, AccountViewProps, AccountsCard, AccountsCardProps, ApiKeysCardProps, AppleIcon, AuthCallback, AuthForm, AuthFormClassNames, AuthFormProps, AuthHooks, AuthLoading, AuthLocalization, AuthMutators, AuthUIContext, AuthUIContextType, AuthUIProvider, AuthUIProviderProps, AuthView, AuthViewClassNames, AuthViewPath, AuthViewPaths, AuthViewProps, ChangeEmailCard, ChangePasswordCard, ChangePasswordCardProps, CreateOrganizationDialog, CreateOrganizationDialogProps, CreateTeamDialog, CreateTeamDialogProps, DeleteAccountCard, DeleteAccountCardProps, DeleteOrganizationCard, DiscordIcon, DropboxIcon, FacebookIcon, ForgotPasswordForm, ForgotPasswordFormProps, GitHubIcon, GitLabIcon, GoogleIcon, HuggingFaceIcon, InputFieldSkeleton, KickIcon, LinearIcon, LinkedInIcon, MagicLinkForm, MagicLinkFormProps, MicrosoftIcon, NeonAuthUIProvider, NeonAuthUIProviderProps, NotionIcon, OrganizationCellView, OrganizationInvitationsCard, OrganizationLogo, OrganizationLogoCard, OrganizationLogoCardProps, OrganizationLogoClassNames, OrganizationLogoProps, OrganizationMembersCard, OrganizationNameCard, OrganizationNameCardProps, OrganizationSettingsCards, OrganizationSettingsCardsProps, OrganizationSlugCard, OrganizationSlugCardProps, OrganizationSwitcher, OrganizationSwitcherClassNames, OrganizationSwitcherProps, OrganizationView, OrganizationViewClassNames, OrganizationViewPageProps, OrganizationViewPath, OrganizationViewPaths, OrganizationViewProps, OrganizationsCard, PasskeysCard, PasskeysCardProps, PasswordInput, Provider, ProvidersCard, ProvidersCardProps, RecoverAccountForm, RecoverAccountFormProps, RedditIcon, RedirectToSignIn, RedirectToSignUp, ResetPasswordForm, ResetPasswordFormProps, RobloxIcon, SecuritySettingsCards, SessionsCard, SessionsCardProps, SettingsCard, SettingsCardClassNames, SettingsCardProps, SettingsCellSkeleton, SignInForm, SignInFormProps, SignOut, SignUpForm, SignUpFormProps, SignedIn, SignedOut, SlackIcon, SpotifyIcon, Team, TeamCell, TeamCellProps, TeamOptions, TeamOptionsContext, TeamsCard, TikTokIcon, TwitchIcon, TwoFactorCard, TwoFactorCardProps, TwoFactorForm, TwoFactorFormProps, UpdateAvatarCard, UpdateAvatarCardProps, UpdateFieldCard, UpdateFieldCardProps, UpdateNameCard, UpdateUsernameCard, UserAvatar, UserAvatarClassNames, UserAvatarProps, UserButton, UserButtonClassNames, UserButtonProps, UserInvitationsCard, UserView, UserViewClassNames, UserViewProps, VKIcon, XIcon, ZoomIcon, accountViewPaths, authLocalization, authViewPaths, getViewByPath, organizationViewPaths, socialProviders, useAuthData, useAuthenticate, useCurrentOrganization, useTheme };
|
package/dist/react/ui/index.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
import { n as dist_exports, r as useTheme, t as NeonAuthUIProvider } from "../../ui-
|
|
2
|
+
import { n as dist_exports, r as useTheme, t as NeonAuthUIProvider } from "../../ui-DAV9H8gz.mjs";
|
|
3
3
|
|
|
4
4
|
var AcceptInvitationCard = dist_exports.AcceptInvitationCard;
|
|
5
5
|
var AccountSettingsCards = dist_exports.AccountSettingsCards;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as NeonAuthAdapterCoreAuthOptions, t as NeonAuthAdapterCore } from "./adapter-core-
|
|
1
|
+
import { n as NeonAuthAdapterCoreAuthOptions, t as NeonAuthAdapterCore } from "./adapter-core-CTmuBvuA.mjs";
|
|
2
2
|
import { AuthClient, BetterAuthClientOptions } from "better-auth/client";
|
|
3
3
|
import * as _supabase_auth_js0 from "@supabase/auth-js";
|
|
4
4
|
import { AuthClient as AuthClient$1, JwtHeader, JwtPayload } from "@supabase/auth-js";
|
|
@@ -98,7 +98,6 @@ declare class SupabaseAuthAdapterImpl extends NeonAuthAdapterCore implements Sup
|
|
|
98
98
|
startAutoRefresh: SupabaseAuthClientInterface['startAutoRefresh'];
|
|
99
99
|
stopAutoRefresh: SupabaseAuthClientInterface['stopAutoRefresh'];
|
|
100
100
|
private verifyEmailOtp;
|
|
101
|
-
private verifyPhoneOtp;
|
|
102
101
|
private emitInitialSession;
|
|
103
102
|
}
|
|
104
103
|
/** Instance type for SupabaseAuthAdapter */
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as DEFAULT_SESSION_EXPIRY_MS, i as CURRENT_TAB_CLIENT_ID, n as BETTER_AUTH_METHODS_CACHE, r as BETTER_AUTH_METHODS_HOOKS, t as NeonAuthAdapterCore } from "./adapter-core-
|
|
1
|
+
import { a as DEFAULT_SESSION_EXPIRY_MS, i as CURRENT_TAB_CLIENT_ID, n as BETTER_AUTH_METHODS_CACHE, r as BETTER_AUTH_METHODS_HOOKS, t as NeonAuthAdapterCore } from "./adapter-core-FGGtjVtJ.mjs";
|
|
2
2
|
import { createAuthClient, getGlobalBroadcastChannel } from "better-auth/client";
|
|
3
3
|
import { AuthApiError, AuthError, isAuthError } from "@supabase/auth-js";
|
|
4
4
|
import { base64url, decodeJwt, decodeProtectedHeader } from "jose";
|
|
@@ -81,6 +81,7 @@ const AuthErrorCode = {
|
|
|
81
81
|
NotImplemented: "not_implemented",
|
|
82
82
|
OAuthProviderNotSupported: "oauth_provider_not_supported",
|
|
83
83
|
PhoneProviderDisabled: "phone_provider_disabled",
|
|
84
|
+
MagicLinkNotSupported: "magic_link_not_supported",
|
|
84
85
|
SsoProviderDisabled: "sso_provider_disabled",
|
|
85
86
|
AnonymousProviderDisabled: "anonymous_provider_disabled",
|
|
86
87
|
Web3ProviderDisabled: "web3_provider_disabled",
|
|
@@ -213,6 +214,12 @@ const ERROR_DEFINITIONS = {
|
|
|
213
214
|
message: "Phone authentication not available",
|
|
214
215
|
description: "Phone number authentication is not enabled"
|
|
215
216
|
},
|
|
217
|
+
[AuthErrorCode.MagicLinkNotSupported]: {
|
|
218
|
+
code: AuthErrorCode.MagicLinkNotSupported,
|
|
219
|
+
status: 403,
|
|
220
|
+
message: "Magic link authentication not available",
|
|
221
|
+
description: "Magic link authentication is not supported"
|
|
222
|
+
},
|
|
216
223
|
[AuthErrorCode.SsoProviderDisabled]: {
|
|
217
224
|
code: AuthErrorCode.SsoProviderDisabled,
|
|
218
225
|
status: 403,
|
|
@@ -856,6 +863,14 @@ var SupabaseAuthAdapterImpl = class extends NeonAuthAdapterCore {
|
|
|
856
863
|
};
|
|
857
864
|
signInWithOtp = async (credentials) => {
|
|
858
865
|
try {
|
|
866
|
+
if ("phone" in credentials) return {
|
|
867
|
+
data: {
|
|
868
|
+
user: null,
|
|
869
|
+
session: null,
|
|
870
|
+
messageId: void 0
|
|
871
|
+
},
|
|
872
|
+
error: createAuthError(AuthErrorCode.PhoneProviderDisabled, "Phone OTP authentication is not supported. Use email-based authentication instead.")
|
|
873
|
+
};
|
|
859
874
|
if ("email" in credentials) {
|
|
860
875
|
await this._betterAuth.emailOtp.sendVerificationOtp({
|
|
861
876
|
email: credentials.email,
|
|
@@ -870,7 +885,7 @@ var SupabaseAuthAdapterImpl = class extends NeonAuthAdapterCore {
|
|
|
870
885
|
error: null
|
|
871
886
|
};
|
|
872
887
|
}
|
|
873
|
-
throw createAuthError(AuthErrorCode.
|
|
888
|
+
throw createAuthError(AuthErrorCode.ValidationFailed, "Invalid OTP credentials format");
|
|
874
889
|
} catch (error) {
|
|
875
890
|
if (isAuthError(error)) return {
|
|
876
891
|
data: {
|
|
@@ -1165,8 +1180,21 @@ var SupabaseAuthAdapterImpl = class extends NeonAuthAdapterCore {
|
|
|
1165
1180
|
};
|
|
1166
1181
|
verifyOtp = async (params) => {
|
|
1167
1182
|
try {
|
|
1183
|
+
if ("phone" in params && params.phone) return {
|
|
1184
|
+
data: {
|
|
1185
|
+
user: null,
|
|
1186
|
+
session: null
|
|
1187
|
+
},
|
|
1188
|
+
error: createAuthError(AuthErrorCode.PhoneProviderDisabled, "Phone OTP verification is not supported. Use email-based authentication instead.")
|
|
1189
|
+
};
|
|
1190
|
+
if ("email" in params && params.type === "magiclink") return {
|
|
1191
|
+
data: {
|
|
1192
|
+
user: null,
|
|
1193
|
+
session: null
|
|
1194
|
+
},
|
|
1195
|
+
error: createAuthError(AuthErrorCode.MagicLinkNotSupported, "Magic link verification is not supported. Use email OTP authentication instead.")
|
|
1196
|
+
};
|
|
1168
1197
|
if ("email" in params && params.email) return await this.verifyEmailOtp(params);
|
|
1169
|
-
if ("phone" in params && params.phone) return await this.verifyPhoneOtp(params);
|
|
1170
1198
|
if ("token_hash" in params && params.token_hash) throw createAuthError(AuthErrorCode.FeatureNotSupported, "Token hash verification not supported");
|
|
1171
1199
|
throw createAuthError(AuthErrorCode.ValidationFailed, "Invalid OTP verification parameters");
|
|
1172
1200
|
} catch (error) {
|
|
@@ -1259,21 +1287,13 @@ var SupabaseAuthAdapterImpl = class extends NeonAuthAdapterCore {
|
|
|
1259
1287
|
}
|
|
1260
1288
|
throw createAuthError(AuthErrorCode.ValidationFailed, `Unsupported resend type: ${type}`);
|
|
1261
1289
|
}
|
|
1262
|
-
if ("phone" in credentials) {
|
|
1263
|
-
|
|
1264
|
-
|
|
1265
|
-
|
|
1266
|
-
|
|
1267
|
-
|
|
1268
|
-
|
|
1269
|
-
messageId: type === "sms" ? "sms-otp-sent" : "phone-change-otp-sent",
|
|
1270
|
-
user: null,
|
|
1271
|
-
session: null
|
|
1272
|
-
},
|
|
1273
|
-
error: null
|
|
1274
|
-
};
|
|
1275
|
-
}
|
|
1276
|
-
}
|
|
1290
|
+
if ("phone" in credentials) return {
|
|
1291
|
+
data: {
|
|
1292
|
+
user: null,
|
|
1293
|
+
session: null
|
|
1294
|
+
},
|
|
1295
|
+
error: createAuthError(AuthErrorCode.PhoneProviderDisabled, "SMS resend is not supported. Use email-based authentication instead.")
|
|
1296
|
+
};
|
|
1277
1297
|
throw createAuthError(AuthErrorCode.ValidationFailed, "Invalid credentials format");
|
|
1278
1298
|
} catch (error) {
|
|
1279
1299
|
if (isAuthError(error)) return {
|
|
@@ -1372,34 +1392,13 @@ var SupabaseAuthAdapterImpl = class extends NeonAuthAdapterCore {
|
|
|
1372
1392
|
error: null
|
|
1373
1393
|
};
|
|
1374
1394
|
}
|
|
1375
|
-
if (type === "magiclink") {
|
|
1376
|
-
|
|
1377
|
-
|
|
1378
|
-
|
|
1379
|
-
}
|
|
1380
|
-
|
|
1381
|
-
|
|
1382
|
-
user: null,
|
|
1383
|
-
session: null
|
|
1384
|
-
},
|
|
1385
|
-
error: normalizeBetterAuthError(result.error)
|
|
1386
|
-
};
|
|
1387
|
-
const sessionResult = await this.getSession({ forceFetch: true });
|
|
1388
|
-
if (!sessionResult.data?.session) return {
|
|
1389
|
-
data: {
|
|
1390
|
-
user: null,
|
|
1391
|
-
session: null
|
|
1392
|
-
},
|
|
1393
|
-
error: createAuthError(AuthErrorCode.SessionNotFound, "Failed to retrieve session after magic link verification")
|
|
1394
|
-
};
|
|
1395
|
-
return {
|
|
1396
|
-
data: {
|
|
1397
|
-
user: sessionResult.data.session?.user || null,
|
|
1398
|
-
session: sessionResult.data.session
|
|
1399
|
-
},
|
|
1400
|
-
error: null
|
|
1401
|
-
};
|
|
1402
|
-
}
|
|
1395
|
+
if (type === "magiclink") return {
|
|
1396
|
+
data: {
|
|
1397
|
+
user: null,
|
|
1398
|
+
session: null
|
|
1399
|
+
},
|
|
1400
|
+
error: createAuthError(AuthErrorCode.MagicLinkNotSupported, "Magic link verification is not supported. Use email OTP authentication instead.")
|
|
1401
|
+
};
|
|
1403
1402
|
if (type === "signup" || type === "invite") {
|
|
1404
1403
|
const result = await this._betterAuth.emailOtp.verifyEmail({
|
|
1405
1404
|
email: params.email,
|
|
@@ -1504,83 +1503,6 @@ var SupabaseAuthAdapterImpl = class extends NeonAuthAdapterCore {
|
|
|
1504
1503
|
error: createAuthError(AuthErrorCode.ValidationFailed, `Unsupported email OTP type: ${type}`)
|
|
1505
1504
|
};
|
|
1506
1505
|
}
|
|
1507
|
-
async verifyPhoneOtp(params) {
|
|
1508
|
-
if (params.type === "sms") {
|
|
1509
|
-
const result = await this._betterAuth.phoneNumber.verify({
|
|
1510
|
-
phoneNumber: params.phone,
|
|
1511
|
-
code: params.token,
|
|
1512
|
-
disableSession: false,
|
|
1513
|
-
updatePhoneNumber: false
|
|
1514
|
-
});
|
|
1515
|
-
if (result.error) return {
|
|
1516
|
-
data: {
|
|
1517
|
-
user: null,
|
|
1518
|
-
session: null
|
|
1519
|
-
},
|
|
1520
|
-
error: normalizeBetterAuthError(result.error)
|
|
1521
|
-
};
|
|
1522
|
-
const sessionResult = await this.getSession({ forceFetch: true });
|
|
1523
|
-
if (sessionResult.error || !sessionResult.data) return {
|
|
1524
|
-
data: {
|
|
1525
|
-
user: null,
|
|
1526
|
-
session: null
|
|
1527
|
-
},
|
|
1528
|
-
error: sessionResult.error || createAuthError(AuthErrorCode.InternalError, "Failed to get session")
|
|
1529
|
-
};
|
|
1530
|
-
return {
|
|
1531
|
-
data: {
|
|
1532
|
-
user: sessionResult.data?.session?.user || null,
|
|
1533
|
-
session: sessionResult.data?.session || null
|
|
1534
|
-
},
|
|
1535
|
-
error: null
|
|
1536
|
-
};
|
|
1537
|
-
}
|
|
1538
|
-
if (params.type === "phone_change") {
|
|
1539
|
-
const currentSession = await this._betterAuth.getSession();
|
|
1540
|
-
if (currentSession.error || !currentSession.data?.session) return {
|
|
1541
|
-
data: {
|
|
1542
|
-
user: null,
|
|
1543
|
-
session: null
|
|
1544
|
-
},
|
|
1545
|
-
error: createAuthError(AuthErrorCode.SessionNotFound, "You must be signed in to change your phone number")
|
|
1546
|
-
};
|
|
1547
|
-
const result = await this._betterAuth.phoneNumber.verify({
|
|
1548
|
-
phoneNumber: params.phone,
|
|
1549
|
-
code: params.token,
|
|
1550
|
-
disableSession: false,
|
|
1551
|
-
updatePhoneNumber: true
|
|
1552
|
-
});
|
|
1553
|
-
if (result.error) return {
|
|
1554
|
-
data: {
|
|
1555
|
-
user: null,
|
|
1556
|
-
session: null
|
|
1557
|
-
},
|
|
1558
|
-
error: normalizeBetterAuthError(result.error)
|
|
1559
|
-
};
|
|
1560
|
-
const sessionResult = await this.getSession({ forceFetch: true });
|
|
1561
|
-
if (sessionResult.error || !sessionResult.data) return {
|
|
1562
|
-
data: {
|
|
1563
|
-
user: null,
|
|
1564
|
-
session: null
|
|
1565
|
-
},
|
|
1566
|
-
error: sessionResult.error || createAuthError(AuthErrorCode.InternalError, "Failed to get updated session")
|
|
1567
|
-
};
|
|
1568
|
-
return {
|
|
1569
|
-
data: {
|
|
1570
|
-
user: sessionResult.data.session?.user || null,
|
|
1571
|
-
session: sessionResult.data.session
|
|
1572
|
-
},
|
|
1573
|
-
error: null
|
|
1574
|
-
};
|
|
1575
|
-
}
|
|
1576
|
-
return {
|
|
1577
|
-
data: {
|
|
1578
|
-
user: null,
|
|
1579
|
-
session: null
|
|
1580
|
-
},
|
|
1581
|
-
error: createAuthError(AuthErrorCode.ValidationFailed, `Unsupported phone OTP type: ${params.type}`)
|
|
1582
|
-
};
|
|
1583
|
-
}
|
|
1584
1506
|
async emitInitialSession(callback) {
|
|
1585
1507
|
try {
|
|
1586
1508
|
const { data, error } = await this.getSession();
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { n as BetterAuthSession, r as BetterAuthUser, t as BetterAuthErrorResponse } from "../better-auth-types-BSQToNou.mjs";
|
|
2
|
+
import { BetterFetchError } from "@better-fetch/fetch";
|
|
3
|
+
import { EmailOTPOptions } from "better-auth/plugins/email-otp";
|
|
4
|
+
import { Invitation, InvitationInput, InvitationStatus, Member, MemberInput, Organization, OrganizationInput, OrganizationRole, Team, TeamInput, TeamMember, TeamMemberInput } from "better-auth/plugins/organization";
|
|
5
|
+
import { JWKOptions, JWSAlgorithms, Jwk, JwtOptions } from "better-auth/plugins/jwt";
|
|
6
|
+
import { AdminOptions, InferAdminRolesFromOption, SessionWithImpersonatedBy, UserWithRole } from "better-auth/plugins/admin";
|
|
7
|
+
export * from "better-auth/types";
|
|
8
|
+
export { type AdminOptions, type BetterAuthErrorResponse, type BetterAuthSession, type BetterAuthUser, type BetterFetchError, type EmailOTPOptions, type InferAdminRolesFromOption, type Invitation, type InvitationInput, type InvitationStatus, type JWKOptions, type JWSAlgorithms, type Jwk, type JwtOptions, type Member, type MemberInput, type Organization, type OrganizationInput, type OrganizationRole, type SessionWithImpersonatedBy, type Team, type TeamInput, type TeamMember, type TeamMemberInput, type UserWithRole };
|