@neondatabase/auth 0.2.0-beta.1 → 0.3.0-beta
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 +201 -0
- package/dist/{adapter-core-CnrOXh1T.d.mts → adapter-core-B9uDhoYq.d.mts} +291 -362
- package/dist/{adapter-core-CtmnMMJ7.mjs → adapter-core-D00qcqMo.mjs} +1 -1
- package/dist/{better-auth-react-adapter-DNi5PC5D.d.mts → better-auth-react-adapter-BO4jLN4H.d.mts} +251 -251
- package/dist/{better-auth-react-adapter-Dv-o6A6O.mjs → better-auth-react-adapter-Xdj-69i9.mjs} +1 -1
- package/dist/{index-CzsGMS7C.d.mts → index-B_Q0Tp1D.d.mts} +0 -1
- package/dist/index.d.mts +92 -4
- package/dist/index.mjs +2 -2
- package/dist/{neon-auth-Cs2cWh1B.mjs → neon-auth-DBOB8sXF.mjs} +1 -1
- package/dist/next/index.d.mts +17 -17
- package/dist/next/index.mjs +3 -3
- package/dist/next/server/index.d.mts +2 -4
- package/dist/next/server/index.mjs +323 -235
- package/dist/react/adapters/index.d.mts +3 -3
- package/dist/react/adapters/index.mjs +2 -2
- package/dist/react/index.d.mts +6 -5
- package/dist/react/index.mjs +5 -5
- package/dist/react/ui/index.d.mts +1 -2
- package/dist/react/ui/index.mjs +2 -4
- package/dist/react/ui/server.mjs +2 -2
- package/dist/{supabase-adapter-BlcGPyOf.mjs → supabase-adapter-CIBMebXB.mjs} +1 -1
- package/dist/{supabase-adapter-DUqw2fw8.d.mts → supabase-adapter-CSDRL1ZU.d.mts} +285 -316
- package/dist/types/index.d.mts +2 -2
- package/dist/ui/.safelist.html +1 -1
- package/dist/ui/css.css +2 -2
- package/dist/ui/theme.css +1 -1
- package/dist/ui-CnVnqGns.mjs +3 -0
- package/dist/vanilla/adapters/index.d.mts +3 -3
- package/dist/vanilla/adapters/index.mjs +2 -2
- package/dist/vanilla/index.d.mts +3 -3
- package/dist/vanilla/index.mjs +2 -2
- package/package.json +23 -21
- package/dist/chunk-VCZJYX65-CLnrj1o7-D6ZQkcc_.mjs +0 -543
- package/dist/neon-auth-BEGCfAe6.d.mts +0 -107
- package/dist/ui-COLWzDsu.mjs +0 -12469
- /package/dist/{adapters-B7YKkjaL.mjs → adapters-CUvhsAvY.mjs} +0 -0
- /package/dist/{index-OEBbnNdr.d.mts → index-UW23fDSn.d.mts} +0 -0
package/dist/{better-auth-react-adapter-Dv-o6A6O.mjs → better-auth-react-adapter-Xdj-69i9.mjs}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as NeonAuthAdapterCore } from "./adapter-core-
|
|
1
|
+
import { t as NeonAuthAdapterCore } from "./adapter-core-D00qcqMo.mjs";
|
|
2
2
|
import { createAuthClient } from "better-auth/react";
|
|
3
3
|
|
|
4
4
|
//#region src/adapters/better-auth-react/better-auth-react-adapter.ts
|
|
@@ -1,3 +1,2 @@
|
|
|
1
|
-
'use client';
|
|
2
1
|
import { 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 } from "@neondatabase/auth-ui";
|
|
3
2
|
export { MagicLinkFormProps as $, SignUpFormProps as $t, ChangePasswordCard as A, UserViewClassNames as An, PasswordInput as At, DropboxIcon as B, socialProviders as Bn, ResetPasswordFormProps as Bt, AuthUIProviderProps as C, UserAvatarClassNames as Cn, OrganizationViewPageProps as Ct, AuthViewPaths as D, UserButtonProps as Dn, OrganizationsCard as Dt, AuthViewPath as E, UserButtonClassNames as En, OrganizationViewProps as Et, CreateTeamDialogProps as F, accountViewPaths as Fn, RecoverAccountFormProps as Ft, GitLabIcon as G, SettingsCard as Gt, ForgotPasswordForm as H, useAuthenticate as Hn, SecuritySettingsCards as Ht, DeleteAccountCard as I, authLocalization as In, RedditIcon as It, InputFieldSkeleton as J, SettingsCellSkeleton as Jt, GoogleIcon as K, SettingsCardClassNames as Kt, DeleteAccountCardProps as L, authViewPaths as Ln, RedirectToSignIn as Lt, CreateOrganizationDialog as M, VKIcon as Mn, ProvidersCard as Mt, CreateOrganizationDialogProps as N, XIcon as Nn, ProvidersCardProps as Nt, AuthViewProps as O, UserInvitationsCard as On, PasskeysCard as Ot, CreateTeamDialog as P, ZoomIcon as Pn, RecoverAccountForm as Pt, MagicLinkForm as Q, SignUpForm as Qt, DeleteOrganizationCard as R, getViewByPath as Rn, RedirectToSignUp as Rt, AuthUIProvider as S, UserAvatar as Sn, OrganizationViewClassNames as St, AuthViewClassNames as T, UserButton as Tn, OrganizationViewPaths as Tt, ForgotPasswordFormProps as U, useCurrentOrganization as Un, SessionsCard as Ut, FacebookIcon as V, useAuthData as Vn, RobloxIcon as Vt, GitHubIcon as W, useTheme as Wn, SessionsCardProps as Wt, LinearIcon as X, SignInFormProps as Xt, KickIcon as Y, SignInForm as Yt, LinkedInIcon as Z, SignOut as Zt, AuthLoading as _, UpdateAvatarCardProps as _n, OrganizationSlugCardProps as _t, AccountViewPath as a, TeamCell as an, OrganizationInvitationsCard as at, AuthUIContext as b, UpdateNameCard as bn, OrganizationSwitcherProps as bt, AccountsCard as c, TeamOptionsContext as cn, OrganizationLogoCardProps as ct, AppleIcon as d, TwitchIcon as dn, OrganizationMembersCard as dt, SignedIn as en, MicrosoftIcon as et, AuthCallback as f, TwoFactorCard as fn, OrganizationNameCard as ft, AuthHooks as g, UpdateAvatarCard as gn, OrganizationSlugCard as gt, AuthFormProps as h, TwoFactorFormProps as hn, OrganizationSettingsCardsProps as ht, AccountView as i, Team as in, OrganizationCellView as it, ChangePasswordCardProps as j, UserViewProps as jn, Provider as jt, ChangeEmailCard as k, UserView as kn, PasskeysCardProps as kt, AccountsCardProps as l, TeamsCard as ln, OrganizationLogoClassNames as lt, AuthFormClassNames as m, TwoFactorForm as mn, OrganizationSettingsCards as mt, AcceptInvitationCardProps as n, SlackIcon as nn, NeonAuthUIProviderProps as nt, AccountViewPaths as o, TeamCellProps as on, OrganizationLogo as ot, AuthForm as p, TwoFactorCardProps as pn, OrganizationNameCardProps as pt, HuggingFaceIcon as q, SettingsCardProps as qt, AccountSettingsCards as r, SpotifyIcon as rn, NotionIcon as rt, AccountViewProps as s, TeamOptions as sn, OrganizationLogoCard as st, AcceptInvitationCard as t, SignedOut as tn, NeonAuthUIProvider as tt, ApiKeysCardProps as u, TikTokIcon as un, OrganizationLogoProps as ut, AuthLocalization as v, UpdateFieldCard as vn, OrganizationSwitcher as vt, AuthView as w, UserAvatarProps as wn, OrganizationViewPath as wt, AuthUIContextType as x, UpdateUsernameCard as xn, OrganizationView as xt, AuthMutators as y, UpdateFieldCardProps as yn, OrganizationSwitcherClassNames as yt, DiscordIcon as z, organizationViewPaths as zn, ResetPasswordForm as zt };
|
package/dist/index.d.mts
CHANGED
|
@@ -1,5 +1,93 @@
|
|
|
1
|
-
import "./adapter-core-
|
|
2
|
-
import "./better-auth-react-adapter-
|
|
3
|
-
import "./supabase-adapter-
|
|
4
|
-
|
|
1
|
+
import { O as VanillaBetterAuthClient, x as ReactBetterAuthClient } from "./adapter-core-B9uDhoYq.mjs";
|
|
2
|
+
import { n as BetterAuthReactAdapterInstance } from "./better-auth-react-adapter-BO4jLN4H.mjs";
|
|
3
|
+
import { r as SupabaseAuthAdapterInstance, s as BetterAuthVanillaAdapterInstance } from "./supabase-adapter-CSDRL1ZU.mjs";
|
|
4
|
+
|
|
5
|
+
//#region src/neon-auth.d.ts
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* Union type of all supported auth adapter instances
|
|
9
|
+
*/
|
|
10
|
+
type NeonAuthAdapter = BetterAuthVanillaAdapterInstance | BetterAuthReactAdapterInstance | SupabaseAuthAdapterInstance;
|
|
11
|
+
/**
|
|
12
|
+
* Configuration for createAuthClient
|
|
13
|
+
*/
|
|
14
|
+
interface NeonAuthConfig<T extends NeonAuthAdapter> {
|
|
15
|
+
/** The adapter builder to use. Defaults to BetterAuthVanillaAdapter() if not specified. */
|
|
16
|
+
adapter?: (url: string, fetchOptions?: {
|
|
17
|
+
headers?: Record<string, string>;
|
|
18
|
+
}) => T;
|
|
19
|
+
/**
|
|
20
|
+
* When true, automatically uses an anonymous token when no user session exists.
|
|
21
|
+
* This enables RLS-based data access for users with the anonymous role.
|
|
22
|
+
* @default false
|
|
23
|
+
*/
|
|
24
|
+
allowAnonymous?: boolean;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Resolves the public API type for an adapter.
|
|
28
|
+
* - SupabaseAuthAdapter: exposes its own methods directly (Supabase-compatible API)
|
|
29
|
+
* - BetterAuth adapters: expose the Better Auth client directly
|
|
30
|
+
*/
|
|
31
|
+
type NeonAuthPublicApi<T extends NeonAuthAdapter> = T extends BetterAuthVanillaAdapterInstance ? VanillaBetterAuthClient : T extends BetterAuthReactAdapterInstance ? ReactBetterAuthClient : T;
|
|
32
|
+
/**
|
|
33
|
+
* NeonAuth type - combines base functionality with the appropriate public API
|
|
34
|
+
* This is the return type of createAuthClient()
|
|
35
|
+
*
|
|
36
|
+
* For SupabaseAuthAdapter: exposes Supabase-compatible methods (signInWithPassword, getSession, etc.)
|
|
37
|
+
* For BetterAuth adapters: exposes the Better Auth client directly (signIn.email, signUp.email, etc.)
|
|
38
|
+
*/
|
|
39
|
+
type NeonAuth<T extends NeonAuthAdapter> = {
|
|
40
|
+
adapter: NeonAuthPublicApi<T>;
|
|
41
|
+
getJWTToken: () => Promise<string | null>;
|
|
42
|
+
};
|
|
43
|
+
/**
|
|
44
|
+
* Create a NeonAuth instance that exposes the appropriate API based on the adapter.
|
|
45
|
+
*
|
|
46
|
+
* @param url - The auth service URL (e.g., 'https://auth.example.com')
|
|
47
|
+
* @param config - Configuration with adapter builder
|
|
48
|
+
* @returns NeonAuth instance with the adapter's API exposed directly
|
|
49
|
+
*
|
|
50
|
+
* @example SupabaseAuthAdapter - Supabase-compatible API
|
|
51
|
+
* ```typescript
|
|
52
|
+
* import { createAuthClient, SupabaseAuthAdapter } from '@neondatabase/auth';
|
|
53
|
+
*
|
|
54
|
+
* const auth = createAuthClient('https://auth.example.com', {
|
|
55
|
+
* adapter: SupabaseAuthAdapter(),
|
|
56
|
+
* });
|
|
57
|
+
*
|
|
58
|
+
* // Supabase-compatible methods
|
|
59
|
+
* await auth.signInWithPassword({ email, password });
|
|
60
|
+
* await auth.getSession();
|
|
61
|
+
* ```
|
|
62
|
+
*
|
|
63
|
+
* @example BetterAuthVanillaAdapter - Direct Better Auth API
|
|
64
|
+
* ```typescript
|
|
65
|
+
* import { createAuthClient, BetterAuthVanillaAdapter } from '@neondatabase/auth';
|
|
66
|
+
*
|
|
67
|
+
* const auth = createAuthClient('https://auth.example.com', {
|
|
68
|
+
* adapter: BetterAuthVanillaAdapter(),
|
|
69
|
+
* });
|
|
70
|
+
*
|
|
71
|
+
* // Direct Better Auth API access
|
|
72
|
+
* await auth.signIn.email({ email, password });
|
|
73
|
+
* await auth.signUp.email({ email, password, name: 'John' });
|
|
74
|
+
* await auth.getSession();
|
|
75
|
+
* ```
|
|
76
|
+
*
|
|
77
|
+
* @example BetterAuthReactAdapter - Better Auth with React hooks
|
|
78
|
+
* ```typescript
|
|
79
|
+
* import { createAuthClient, BetterAuthReactAdapter } from '@neondatabase/auth';
|
|
80
|
+
*
|
|
81
|
+
* const auth = createAuthClient('https://auth.example.com', {
|
|
82
|
+
* adapter: BetterAuthReactAdapter(),
|
|
83
|
+
* });
|
|
84
|
+
*
|
|
85
|
+
* // Direct Better Auth API with React hooks
|
|
86
|
+
* await auth.signIn.email({ email, password });
|
|
87
|
+
* const session = auth.useSession(); // React hook
|
|
88
|
+
* ```
|
|
89
|
+
*/
|
|
90
|
+
declare function createInternalNeonAuth<T extends NeonAuthAdapter = BetterAuthVanillaAdapterInstance>(url: string, config?: NeonAuthConfigInternal<T>): NeonAuth<T>;
|
|
91
|
+
declare function createAuthClient<T extends NeonAuthAdapter = BetterAuthVanillaAdapterInstance>(url: string, config?: NeonAuthConfig<T>): NeonAuthPublicApi<T>;
|
|
92
|
+
//#endregion
|
|
5
93
|
export { type NeonAuth, type NeonAuthAdapter, type NeonAuthConfig, type NeonAuthPublicApi, type ReactBetterAuthClient, type VanillaBetterAuthClient, createAuthClient, createInternalNeonAuth };
|
package/dist/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import "./adapter-core-
|
|
2
|
-
import { n as createInternalNeonAuth, t as createAuthClient } from "./neon-auth-
|
|
1
|
+
import "./adapter-core-D00qcqMo.mjs";
|
|
2
|
+
import { n as createInternalNeonAuth, t as createAuthClient } from "./neon-auth-DBOB8sXF.mjs";
|
|
3
3
|
|
|
4
4
|
export { createAuthClient, createInternalNeonAuth };
|
package/dist/next/index.d.mts
CHANGED
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as better_auth_react0 from "better-auth/react";
|
|
2
2
|
import * as jose0 from "jose";
|
|
3
|
+
import * as better_auth_plugins0 from "better-auth/plugins";
|
|
3
4
|
import * as better_auth0 from "better-auth";
|
|
4
5
|
import * as _better_fetch_fetch0 from "@better-fetch/fetch";
|
|
5
|
-
import * as better_auth_plugins0 from "better-auth/plugins";
|
|
6
|
-
import * as nanostores0 from "nanostores";
|
|
7
6
|
|
|
8
7
|
//#region src/next/index.d.ts
|
|
9
8
|
declare function createAuthClient(): {
|
|
@@ -34,7 +33,7 @@ declare function createAuthClient(): {
|
|
|
34
33
|
organizationId: string;
|
|
35
34
|
email: string;
|
|
36
35
|
role: "admin" | "member" | "owner";
|
|
37
|
-
status:
|
|
36
|
+
status: better_auth_plugins0.InvitationStatus;
|
|
38
37
|
inviterId: string;
|
|
39
38
|
expiresAt: Date;
|
|
40
39
|
createdAt: Date;
|
|
@@ -545,7 +544,7 @@ declare function createAuthClient(): {
|
|
|
545
544
|
organizationId: string;
|
|
546
545
|
email: string;
|
|
547
546
|
role: "admin" | "member" | "owner";
|
|
548
|
-
status:
|
|
547
|
+
status: better_auth_plugins0.InvitationStatus;
|
|
549
548
|
inviterId: string;
|
|
550
549
|
expiresAt: Date;
|
|
551
550
|
createdAt: Date;
|
|
@@ -594,7 +593,7 @@ declare function createAuthClient(): {
|
|
|
594
593
|
organizationId: string;
|
|
595
594
|
email: string;
|
|
596
595
|
role: "admin" | "member" | "owner";
|
|
597
|
-
status:
|
|
596
|
+
status: better_auth_plugins0.InvitationStatus;
|
|
598
597
|
inviterId: string;
|
|
599
598
|
expiresAt: Date;
|
|
600
599
|
createdAt: Date;
|
|
@@ -647,7 +646,7 @@ declare function createAuthClient(): {
|
|
|
647
646
|
organizationId: string;
|
|
648
647
|
email: string;
|
|
649
648
|
role: "admin" | "member" | "owner";
|
|
650
|
-
status:
|
|
649
|
+
status: better_auth_plugins0.InvitationStatus;
|
|
651
650
|
inviterId: string;
|
|
652
651
|
expiresAt: Date;
|
|
653
652
|
createdAt: Date;
|
|
@@ -669,7 +668,7 @@ declare function createAuthClient(): {
|
|
|
669
668
|
organizationId: string;
|
|
670
669
|
email: string;
|
|
671
670
|
role: "admin" | "member" | "owner";
|
|
672
|
-
status:
|
|
671
|
+
status: better_auth_plugins0.InvitationStatus;
|
|
673
672
|
inviterId: string;
|
|
674
673
|
expiresAt: Date;
|
|
675
674
|
createdAt: Date;
|
|
@@ -692,7 +691,7 @@ declare function createAuthClient(): {
|
|
|
692
691
|
organizationId: string;
|
|
693
692
|
email: string;
|
|
694
693
|
role: "admin" | "member" | "owner";
|
|
695
|
-
status:
|
|
694
|
+
status: better_auth_plugins0.InvitationStatus;
|
|
696
695
|
inviterId: string;
|
|
697
696
|
expiresAt: Date;
|
|
698
697
|
createdAt: Date;
|
|
@@ -723,7 +722,7 @@ declare function createAuthClient(): {
|
|
|
723
722
|
organizationId: string;
|
|
724
723
|
email: string;
|
|
725
724
|
role: "admin" | "member" | "owner";
|
|
726
|
-
status:
|
|
725
|
+
status: better_auth_plugins0.InvitationStatus;
|
|
727
726
|
inviterId: string;
|
|
728
727
|
expiresAt: Date;
|
|
729
728
|
createdAt: Date;
|
|
@@ -750,7 +749,7 @@ declare function createAuthClient(): {
|
|
|
750
749
|
organizationId: string;
|
|
751
750
|
email: string;
|
|
752
751
|
role: "member" | "admin" | "owner";
|
|
753
|
-
status:
|
|
752
|
+
status: better_auth_plugins0.InvitationStatus;
|
|
754
753
|
inviterId: string;
|
|
755
754
|
expiresAt: Date;
|
|
756
755
|
createdAt: Date;
|
|
@@ -775,7 +774,7 @@ declare function createAuthClient(): {
|
|
|
775
774
|
organizationId: string;
|
|
776
775
|
email: string;
|
|
777
776
|
role: "admin" | "member" | "owner";
|
|
778
|
-
status:
|
|
777
|
+
status: better_auth_plugins0.InvitationStatus;
|
|
779
778
|
inviterId: string;
|
|
780
779
|
expiresAt: Date;
|
|
781
780
|
createdAt: Date;
|
|
@@ -936,7 +935,7 @@ declare function createAuthClient(): {
|
|
|
936
935
|
organizationId: string;
|
|
937
936
|
email: string;
|
|
938
937
|
role: "admin" | "member" | "owner";
|
|
939
|
-
status:
|
|
938
|
+
status: better_auth_plugins0.InvitationStatus;
|
|
940
939
|
inviterId: string;
|
|
941
940
|
expiresAt: Date;
|
|
942
941
|
createdAt: Date;
|
|
@@ -1817,7 +1816,7 @@ declare function createAuthClient(): {
|
|
|
1817
1816
|
organizationId: string;
|
|
1818
1817
|
email: string;
|
|
1819
1818
|
role: "admin" | "member" | "owner";
|
|
1820
|
-
status:
|
|
1819
|
+
status: better_auth_plugins0.InvitationStatus;
|
|
1821
1820
|
inviterId: string;
|
|
1822
1821
|
expiresAt: Date;
|
|
1823
1822
|
createdAt: Date;
|
|
@@ -1843,7 +1842,7 @@ declare function createAuthClient(): {
|
|
|
1843
1842
|
organizationId: string;
|
|
1844
1843
|
email: string;
|
|
1845
1844
|
role: "admin" | "member" | "owner";
|
|
1846
|
-
status:
|
|
1845
|
+
status: better_auth_plugins0.InvitationStatus;
|
|
1847
1846
|
inviterId: string;
|
|
1848
1847
|
expiresAt: Date;
|
|
1849
1848
|
createdAt: Date;
|
|
@@ -1958,7 +1957,7 @@ declare function createAuthClient(): {
|
|
|
1958
1957
|
};
|
|
1959
1958
|
};
|
|
1960
1959
|
$fetch: _better_fetch_fetch0.BetterFetch<{
|
|
1961
|
-
plugins: (_better_fetch_fetch0.BetterFetchPlugin | {
|
|
1960
|
+
plugins: (_better_fetch_fetch0.BetterFetchPlugin<Record<string, any>> | {
|
|
1962
1961
|
id: string;
|
|
1963
1962
|
name: string;
|
|
1964
1963
|
hooks: {
|
|
@@ -2026,7 +2025,7 @@ declare function createAuthClient(): {
|
|
|
2026
2025
|
$store: {
|
|
2027
2026
|
notify: (signal?: (Omit<string, "$sessionSignal"> | "$sessionSignal") | undefined) => void;
|
|
2028
2027
|
listen: (signal: Omit<string, "$sessionSignal"> | "$sessionSignal", listener: (value: boolean, oldValue?: boolean | undefined) => void) => void;
|
|
2029
|
-
atoms: Record<string,
|
|
2028
|
+
atoms: Record<string, better_auth_react0.WritableAtom<any>>;
|
|
2030
2029
|
};
|
|
2031
2030
|
$ERROR_CODES: {
|
|
2032
2031
|
readonly FAILED_TO_CREATE_USER: "Failed to create user";
|
|
@@ -2049,6 +2048,7 @@ declare function createAuthClient(): {
|
|
|
2049
2048
|
readonly YOU_CANNOT_REMOVE_YOURSELF: "You cannot remove yourself";
|
|
2050
2049
|
readonly YOU_ARE_NOT_ALLOWED_TO_SET_NON_EXISTENT_VALUE: "You are not allowed to set a non-existent role value";
|
|
2051
2050
|
readonly YOU_CANNOT_IMPERSONATE_ADMINS: "You cannot impersonate admins";
|
|
2051
|
+
readonly INVALID_ROLE_TYPE: "Invalid role type";
|
|
2052
2052
|
readonly YOU_ARE_NOT_ALLOWED_TO_CREATE_A_NEW_ORGANIZATION: "You are not allowed to create a new organization";
|
|
2053
2053
|
readonly YOU_HAVE_REACHED_THE_MAXIMUM_NUMBER_OF_ORGANIZATIONS: "You have reached the maximum number of organizations";
|
|
2054
2054
|
readonly ORGANIZATION_ALREADY_EXISTS: "Organization already exists";
|
package/dist/next/index.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import "../adapter-core-
|
|
2
|
-
import { t as BetterAuthReactAdapter } from "../better-auth-react-adapter-
|
|
3
|
-
import { t as createAuthClient$1 } from "../neon-auth-
|
|
1
|
+
import "../adapter-core-D00qcqMo.mjs";
|
|
2
|
+
import { t as BetterAuthReactAdapter } from "../better-auth-react-adapter-Xdj-69i9.mjs";
|
|
3
|
+
import { t as createAuthClient$1 } from "../neon-auth-DBOB8sXF.mjs";
|
|
4
4
|
|
|
5
5
|
//#region src/next/index.ts
|
|
6
6
|
function createAuthClient() {
|
|
@@ -1,10 +1,8 @@
|
|
|
1
|
-
import "../../adapter-core-
|
|
2
|
-
import "../../better-auth-react-adapter-DNi5PC5D.mjs";
|
|
3
|
-
import "../../supabase-adapter-DUqw2fw8.mjs";
|
|
4
|
-
import { o as VanillaBetterAuthClient } from "../../neon-auth-BEGCfAe6.mjs";
|
|
1
|
+
import { O as VanillaBetterAuthClient } from "../../adapter-core-B9uDhoYq.mjs";
|
|
5
2
|
import { NextRequest, NextResponse } from "next/server";
|
|
6
3
|
|
|
7
4
|
//#region src/server/config.d.ts
|
|
5
|
+
|
|
8
6
|
/**
|
|
9
7
|
* Framework-agnostic configuration types for Neon Auth
|
|
10
8
|
*/
|