better-auth-ui 3.2.25 → 3.2.27
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/auth-hooks-BzWCr6ip.d.cts +2678 -0
- package/dist/auth-hooks-BzWCr6ip.d.ts +2678 -0
- package/dist/{auth-ui-provider-B4nloIHk.d.ts → auth-ui-provider-BBetNzzD.d.ts} +1 -1
- package/dist/{auth-ui-provider-DndP_Qgj.d.cts → auth-ui-provider-DH3H37A_.d.cts} +1 -1
- package/dist/index.cjs +3 -5
- package/dist/index.d.cts +9 -8
- package/dist/index.d.ts +9 -8
- package/dist/index.js +3 -5
- package/dist/instantdb.cjs +2 -1
- package/dist/instantdb.d.cts +2 -1
- package/dist/instantdb.d.ts +2 -1
- package/dist/instantdb.js +2 -1
- package/dist/metafile-cjs.json +1 -1
- package/dist/metafile-esm.json +1 -1
- package/dist/tanstack.cjs +1 -1
- package/dist/tanstack.d.cts +3 -2
- package/dist/tanstack.d.ts +3 -2
- package/dist/tanstack.js +1 -1
- package/dist/triplit.cjs +3 -2
- package/dist/triplit.d.cts +2 -1
- package/dist/triplit.d.ts +2 -1
- package/dist/triplit.js +3 -2
- package/package.json +8 -3
- package/src/components/organization/member-cell.tsx +2 -2
- package/src/components/organization/organization-members-card.tsx +1 -1
- package/src/components/settings/providers/provider-cell.tsx +1 -1
- package/src/lib/instantdb/use-session.ts +7 -6
- package/src/lib/tanstack/use-tanstack-options.ts +2 -2
- package/src/lib/triplit/use-session.ts +8 -7
- package/src/types/auth-client.ts +9 -2
- package/dist/auth-hooks-Kg4U0adj.d.cts +0 -6437
- package/dist/auth-hooks-Kg4U0adj.d.ts +0 -6437
|
@@ -2,7 +2,7 @@ import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
|
2
2
|
import * as React from 'react';
|
|
3
3
|
import { ComponentType, ReactNode } from 'react';
|
|
4
4
|
import { f as AccountViewPaths, P as PasswordValidation, g as OrganizationViewPaths, h as authLocalization, c as AuthViewPaths, A as AuthLocalization } from './view-paths-CIL7NXLh.js';
|
|
5
|
-
import { a as AuthClient, b as AuthHooks, A as AnyAuthClient } from './auth-hooks-
|
|
5
|
+
import { a as AuthClient, b as AuthHooks, A as AnyAuthClient } from './auth-hooks-BzWCr6ip.js';
|
|
6
6
|
import { A as AuthMutators } from './auth-mutators-DdqOmQ32.js';
|
|
7
7
|
import { SocialProvider } from 'better-auth/social-providers';
|
|
8
8
|
|
|
@@ -2,7 +2,7 @@ import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
|
2
2
|
import * as React from 'react';
|
|
3
3
|
import { ComponentType, ReactNode } from 'react';
|
|
4
4
|
import { f as AccountViewPaths, P as PasswordValidation, g as OrganizationViewPaths, h as authLocalization, c as AuthViewPaths, A as AuthLocalization } from './view-paths-CIL7NXLh.cjs';
|
|
5
|
-
import { a as AuthClient, b as AuthHooks, A as AnyAuthClient } from './auth-hooks-
|
|
5
|
+
import { a as AuthClient, b as AuthHooks, A as AnyAuthClient } from './auth-hooks-BzWCr6ip.cjs';
|
|
6
6
|
import { A as AuthMutators } from './auth-mutators-DdqOmQ32.cjs';
|
|
7
7
|
import { SocialProvider } from 'better-auth/social-providers';
|
|
8
8
|
|
package/dist/index.cjs
CHANGED
|
@@ -5127,7 +5127,7 @@ function AccountInfo({ account }) {
|
|
|
5127
5127
|
hooks: { useAccountInfo }
|
|
5128
5128
|
} = _react.useContext.call(void 0, _chunkGB6DYT26cjs.AuthUIContext);
|
|
5129
5129
|
const { data: accountInfo, isPending } = useAccountInfo({
|
|
5130
|
-
accountId: account.accountId
|
|
5130
|
+
query: { accountId: account.accountId }
|
|
5131
5131
|
});
|
|
5132
5132
|
if (isPending) {
|
|
5133
5133
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, Skeleton, { className: "my-0.5 h-3 w-28" });
|
|
@@ -10980,7 +10980,7 @@ function MemberCell({
|
|
|
10980
10980
|
);
|
|
10981
10981
|
const { data: hasPermissionToUpdateMember } = useHasPermission({
|
|
10982
10982
|
organizationId: member.organizationId,
|
|
10983
|
-
|
|
10983
|
+
permissions: { member: ["update"] }
|
|
10984
10984
|
});
|
|
10985
10985
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
|
|
10986
10986
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
@@ -11163,7 +11163,7 @@ function OrganizationMembersContent({
|
|
|
11163
11163
|
isPending: isPendingUpdateMember
|
|
11164
11164
|
} = useHasPermission({
|
|
11165
11165
|
organizationId: organization.id,
|
|
11166
|
-
|
|
11166
|
+
permissions: {
|
|
11167
11167
|
member: ["update"]
|
|
11168
11168
|
}
|
|
11169
11169
|
});
|
|
@@ -12535,12 +12535,10 @@ function UserButton({
|
|
|
12535
12535
|
|
|
12536
12536
|
|
|
12537
12537
|
|
|
12538
|
-
|
|
12539
12538
|
var _plugins = require('better-auth/client/plugins');
|
|
12540
12539
|
var _react2 = require('better-auth/react');
|
|
12541
12540
|
var authClient = _react2.createAuthClient.call(void 0, {
|
|
12542
12541
|
plugins: [
|
|
12543
|
-
_plugins.apiKeyClient.call(void 0, ),
|
|
12544
12542
|
_plugins.multiSessionClient.call(void 0, ),
|
|
12545
12543
|
_plugins.oneTapClient.call(void 0, {
|
|
12546
12544
|
clientId: ""
|
package/dist/index.d.cts
CHANGED
|
@@ -8,18 +8,19 @@ import * as DialogPrimitive from '@radix-ui/react-dialog';
|
|
|
8
8
|
import { Organization } from 'better-auth/plugins/organization';
|
|
9
9
|
import * as class_variance_authority_types from 'class-variance-authority/types';
|
|
10
10
|
import { VariantProps } from 'class-variance-authority';
|
|
11
|
-
import { F as FieldType, G as GravatarOptions } from './auth-ui-provider-
|
|
12
|
-
export { p as AccountOptions, q as AccountOptionsContext, r as AdditionalField, t as AdditionalFields, A as AppleIcon, m as AuthUIContext, k as AuthUIContextType, n as AuthUIProvider, l as AuthUIProviderProps, u as AvatarOptions, C as CaptchaOptions, v as CredentialsOptions, w as DeleteUserOptions, D as DiscordIcon, b as DropboxIcon, c as FacebookIcon, x as GenericOAuthOptions, d as GitHubIcon, e as GitLabIcon, f as GoogleIcon, H as HuggingFaceIcon, K as KickIcon, L as LinearIcon, y as Link, g as LinkedInIcon, M as MicrosoftIcon, N as NotionIcon, O as OrganizationLogoOptions, z as OrganizationOptions, B as OrganizationOptionsContext, o as Provider, a as ProviderIcon, P as ProviderIconProps, R as RedditIcon, E as RenderToast, h as RobloxIcon, I as SignUpOptions, S as SlackIcon, J as SocialOptions, i as SpotifyIcon, T as TikTokIcon, j as TwitchIcon, V as VKIcon, X as XIcon, Z as ZoomIcon, s as socialProviders } from './auth-ui-provider-
|
|
11
|
+
import { F as FieldType, G as GravatarOptions } from './auth-ui-provider-DH3H37A_.cjs';
|
|
12
|
+
export { p as AccountOptions, q as AccountOptionsContext, r as AdditionalField, t as AdditionalFields, A as AppleIcon, m as AuthUIContext, k as AuthUIContextType, n as AuthUIProvider, l as AuthUIProviderProps, u as AvatarOptions, C as CaptchaOptions, v as CredentialsOptions, w as DeleteUserOptions, D as DiscordIcon, b as DropboxIcon, c as FacebookIcon, x as GenericOAuthOptions, d as GitHubIcon, e as GitLabIcon, f as GoogleIcon, H as HuggingFaceIcon, K as KickIcon, L as LinearIcon, y as Link, g as LinkedInIcon, M as MicrosoftIcon, N as NotionIcon, O as OrganizationLogoOptions, z as OrganizationOptions, B as OrganizationOptionsContext, o as Provider, a as ProviderIcon, P as ProviderIconProps, R as RedditIcon, E as RenderToast, h as RobloxIcon, I as SignUpOptions, S as SlackIcon, J as SocialOptions, i as SpotifyIcon, T as TikTokIcon, j as TwitchIcon, V as VKIcon, X as XIcon, Z as ZoomIcon, s as socialProviders } from './auth-ui-provider-DH3H37A_.cjs';
|
|
13
13
|
import * as better_auth from 'better-auth';
|
|
14
14
|
import { Account } from 'better-auth';
|
|
15
|
-
import { R as Refetch, A as AnyAuthClient } from './auth-hooks-
|
|
16
|
-
export { a as AuthClient, b as AuthHooks, I as Invitation, S as Session, U as User } from './auth-hooks-
|
|
17
|
-
import * as
|
|
15
|
+
import { R as Refetch, A as AnyAuthClient } from './auth-hooks-BzWCr6ip.cjs';
|
|
16
|
+
export { a as AuthClient, b as AuthHooks, I as Invitation, S as Session, U as User } from './auth-hooks-BzWCr6ip.cjs';
|
|
17
|
+
import * as better_auth_react from 'better-auth/react';
|
|
18
18
|
export { c as cn, e as errorCodeToCamelCase, d as getKeyByValue, g as getLocalizedError, f as getPasswordSchema, a as getSearchParam, b as getViewByPath, i as isValidEmail } from './utils-CaN43O_Z.cjs';
|
|
19
19
|
export { A as AuthMutators } from './auth-mutators-DdqOmQ32.cjs';
|
|
20
20
|
import 'better-auth/social-providers';
|
|
21
|
-
import 'better-
|
|
21
|
+
import '@better-fetch/fetch';
|
|
22
22
|
import 'better-auth/client/plugins';
|
|
23
|
+
import 'better-auth/plugins';
|
|
23
24
|
import 'clsx';
|
|
24
25
|
import 'zod';
|
|
25
26
|
|
|
@@ -755,10 +756,10 @@ declare function useAuthenticate<TAuthClient extends AnyAuthClient>(options?: Au
|
|
|
755
756
|
} | null | undefined;
|
|
756
757
|
user: TAuthClient["$Infer"]["Session"]["user"] | undefined;
|
|
757
758
|
isPending: boolean;
|
|
758
|
-
error:
|
|
759
|
+
error: better_auth_react.BetterFetchError | null;
|
|
759
760
|
refetch: (queryParams?: {
|
|
760
761
|
query?: better_auth.SessionQueryParams;
|
|
761
|
-
}) => void
|
|
762
|
+
} | undefined) => Promise<void>;
|
|
762
763
|
};
|
|
763
764
|
|
|
764
765
|
declare function useCaptcha({ localization }: {
|
package/dist/index.d.ts
CHANGED
|
@@ -8,18 +8,19 @@ import * as DialogPrimitive from '@radix-ui/react-dialog';
|
|
|
8
8
|
import { Organization } from 'better-auth/plugins/organization';
|
|
9
9
|
import * as class_variance_authority_types from 'class-variance-authority/types';
|
|
10
10
|
import { VariantProps } from 'class-variance-authority';
|
|
11
|
-
import { F as FieldType, G as GravatarOptions } from './auth-ui-provider-
|
|
12
|
-
export { p as AccountOptions, q as AccountOptionsContext, r as AdditionalField, t as AdditionalFields, A as AppleIcon, m as AuthUIContext, k as AuthUIContextType, n as AuthUIProvider, l as AuthUIProviderProps, u as AvatarOptions, C as CaptchaOptions, v as CredentialsOptions, w as DeleteUserOptions, D as DiscordIcon, b as DropboxIcon, c as FacebookIcon, x as GenericOAuthOptions, d as GitHubIcon, e as GitLabIcon, f as GoogleIcon, H as HuggingFaceIcon, K as KickIcon, L as LinearIcon, y as Link, g as LinkedInIcon, M as MicrosoftIcon, N as NotionIcon, O as OrganizationLogoOptions, z as OrganizationOptions, B as OrganizationOptionsContext, o as Provider, a as ProviderIcon, P as ProviderIconProps, R as RedditIcon, E as RenderToast, h as RobloxIcon, I as SignUpOptions, S as SlackIcon, J as SocialOptions, i as SpotifyIcon, T as TikTokIcon, j as TwitchIcon, V as VKIcon, X as XIcon, Z as ZoomIcon, s as socialProviders } from './auth-ui-provider-
|
|
11
|
+
import { F as FieldType, G as GravatarOptions } from './auth-ui-provider-BBetNzzD.js';
|
|
12
|
+
export { p as AccountOptions, q as AccountOptionsContext, r as AdditionalField, t as AdditionalFields, A as AppleIcon, m as AuthUIContext, k as AuthUIContextType, n as AuthUIProvider, l as AuthUIProviderProps, u as AvatarOptions, C as CaptchaOptions, v as CredentialsOptions, w as DeleteUserOptions, D as DiscordIcon, b as DropboxIcon, c as FacebookIcon, x as GenericOAuthOptions, d as GitHubIcon, e as GitLabIcon, f as GoogleIcon, H as HuggingFaceIcon, K as KickIcon, L as LinearIcon, y as Link, g as LinkedInIcon, M as MicrosoftIcon, N as NotionIcon, O as OrganizationLogoOptions, z as OrganizationOptions, B as OrganizationOptionsContext, o as Provider, a as ProviderIcon, P as ProviderIconProps, R as RedditIcon, E as RenderToast, h as RobloxIcon, I as SignUpOptions, S as SlackIcon, J as SocialOptions, i as SpotifyIcon, T as TikTokIcon, j as TwitchIcon, V as VKIcon, X as XIcon, Z as ZoomIcon, s as socialProviders } from './auth-ui-provider-BBetNzzD.js';
|
|
13
13
|
import * as better_auth from 'better-auth';
|
|
14
14
|
import { Account } from 'better-auth';
|
|
15
|
-
import { R as Refetch, A as AnyAuthClient } from './auth-hooks-
|
|
16
|
-
export { a as AuthClient, b as AuthHooks, I as Invitation, S as Session, U as User } from './auth-hooks-
|
|
17
|
-
import * as
|
|
15
|
+
import { R as Refetch, A as AnyAuthClient } from './auth-hooks-BzWCr6ip.js';
|
|
16
|
+
export { a as AuthClient, b as AuthHooks, I as Invitation, S as Session, U as User } from './auth-hooks-BzWCr6ip.js';
|
|
17
|
+
import * as better_auth_react from 'better-auth/react';
|
|
18
18
|
export { c as cn, e as errorCodeToCamelCase, d as getKeyByValue, g as getLocalizedError, f as getPasswordSchema, a as getSearchParam, b as getViewByPath, i as isValidEmail } from './utils-yT5zrMzq.js';
|
|
19
19
|
export { A as AuthMutators } from './auth-mutators-DdqOmQ32.js';
|
|
20
20
|
import 'better-auth/social-providers';
|
|
21
|
-
import 'better-
|
|
21
|
+
import '@better-fetch/fetch';
|
|
22
22
|
import 'better-auth/client/plugins';
|
|
23
|
+
import 'better-auth/plugins';
|
|
23
24
|
import 'clsx';
|
|
24
25
|
import 'zod';
|
|
25
26
|
|
|
@@ -755,10 +756,10 @@ declare function useAuthenticate<TAuthClient extends AnyAuthClient>(options?: Au
|
|
|
755
756
|
} | null | undefined;
|
|
756
757
|
user: TAuthClient["$Infer"]["Session"]["user"] | undefined;
|
|
757
758
|
isPending: boolean;
|
|
758
|
-
error:
|
|
759
|
+
error: better_auth_react.BetterFetchError | null;
|
|
759
760
|
refetch: (queryParams?: {
|
|
760
761
|
query?: better_auth.SessionQueryParams;
|
|
761
|
-
}) => void
|
|
762
|
+
} | undefined) => Promise<void>;
|
|
762
763
|
};
|
|
763
764
|
|
|
764
765
|
declare function useCaptcha({ localization }: {
|
package/dist/index.js
CHANGED
|
@@ -5127,7 +5127,7 @@ function AccountInfo({ account }) {
|
|
|
5127
5127
|
hooks: { useAccountInfo }
|
|
5128
5128
|
} = useContext31(AuthUIContext);
|
|
5129
5129
|
const { data: accountInfo, isPending } = useAccountInfo({
|
|
5130
|
-
accountId: account.accountId
|
|
5130
|
+
query: { accountId: account.accountId }
|
|
5131
5131
|
});
|
|
5132
5132
|
if (isPending) {
|
|
5133
5133
|
return /* @__PURE__ */ jsx47(Skeleton, { className: "my-0.5 h-3 w-28" });
|
|
@@ -10980,7 +10980,7 @@ function MemberCell({
|
|
|
10980
10980
|
);
|
|
10981
10981
|
const { data: hasPermissionToUpdateMember } = useHasPermission({
|
|
10982
10982
|
organizationId: member.organizationId,
|
|
10983
|
-
|
|
10983
|
+
permissions: { member: ["update"] }
|
|
10984
10984
|
});
|
|
10985
10985
|
return /* @__PURE__ */ jsxs74(Fragment27, { children: [
|
|
10986
10986
|
/* @__PURE__ */ jsxs74(
|
|
@@ -11163,7 +11163,7 @@ function OrganizationMembersContent({
|
|
|
11163
11163
|
isPending: isPendingUpdateMember
|
|
11164
11164
|
} = useHasPermission({
|
|
11165
11165
|
organizationId: organization.id,
|
|
11166
|
-
|
|
11166
|
+
permissions: {
|
|
11167
11167
|
member: ["update"]
|
|
11168
11168
|
}
|
|
11169
11169
|
});
|
|
@@ -12527,7 +12527,6 @@ function UserButton({
|
|
|
12527
12527
|
// src/types/auth-client.ts
|
|
12528
12528
|
import {
|
|
12529
12529
|
anonymousClient,
|
|
12530
|
-
apiKeyClient,
|
|
12531
12530
|
emailOTPClient,
|
|
12532
12531
|
genericOAuthClient,
|
|
12533
12532
|
magicLinkClient,
|
|
@@ -12540,7 +12539,6 @@ import {
|
|
|
12540
12539
|
import { createAuthClient } from "better-auth/react";
|
|
12541
12540
|
var authClient = createAuthClient({
|
|
12542
12541
|
plugins: [
|
|
12543
|
-
apiKeyClient(),
|
|
12544
12542
|
multiSessionClient(),
|
|
12545
12543
|
oneTapClient({
|
|
12546
12544
|
clientId: ""
|
package/dist/instantdb.cjs
CHANGED
|
@@ -118,7 +118,8 @@ function useSession({
|
|
|
118
118
|
user: (sessionData == null ? void 0 : sessionData.user.id) === (user == null ? void 0 : user.id) ? user : sessionData.user
|
|
119
119
|
} : null,
|
|
120
120
|
isPending,
|
|
121
|
-
|
|
121
|
+
isRefetching: false,
|
|
122
|
+
refetch: refetch || (async () => {
|
|
122
123
|
}),
|
|
123
124
|
error: error || null
|
|
124
125
|
};
|
package/dist/instantdb.d.cts
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import { InstantReactWebDatabase } from '@instantdb/react';
|
|
2
2
|
import { User } from 'better-auth';
|
|
3
|
-
import { S as Session, R as Refetch, b as AuthHooks } from './auth-hooks-
|
|
3
|
+
import { S as Session, R as Refetch, b as AuthHooks } from './auth-hooks-BzWCr6ip.cjs';
|
|
4
4
|
import { A as AuthMutators } from './auth-mutators-DdqOmQ32.cjs';
|
|
5
5
|
import '@better-fetch/fetch';
|
|
6
6
|
import 'better-auth/plugins/organization';
|
|
7
7
|
import 'better-auth/react';
|
|
8
8
|
import 'better-auth/client/plugins';
|
|
9
|
+
import 'better-auth/plugins';
|
|
9
10
|
|
|
10
11
|
declare const namespaces: readonly ["user", "session", "account", "passkey"];
|
|
11
12
|
type Namespace = (typeof namespaces)[number];
|
package/dist/instantdb.d.ts
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import { InstantReactWebDatabase } from '@instantdb/react';
|
|
2
2
|
import { User } from 'better-auth';
|
|
3
|
-
import { S as Session, R as Refetch, b as AuthHooks } from './auth-hooks-
|
|
3
|
+
import { S as Session, R as Refetch, b as AuthHooks } from './auth-hooks-BzWCr6ip.js';
|
|
4
4
|
import { A as AuthMutators } from './auth-mutators-DdqOmQ32.js';
|
|
5
5
|
import '@better-fetch/fetch';
|
|
6
6
|
import 'better-auth/plugins/organization';
|
|
7
7
|
import 'better-auth/react';
|
|
8
8
|
import 'better-auth/client/plugins';
|
|
9
|
+
import 'better-auth/plugins';
|
|
9
10
|
|
|
10
11
|
declare const namespaces: readonly ["user", "session", "account", "passkey"];
|
|
11
12
|
type Namespace = (typeof namespaces)[number];
|
package/dist/instantdb.js
CHANGED
|
@@ -118,7 +118,8 @@ function useSession({
|
|
|
118
118
|
user: (sessionData == null ? void 0 : sessionData.user.id) === (user == null ? void 0 : user.id) ? user : sessionData.user
|
|
119
119
|
} : null,
|
|
120
120
|
isPending,
|
|
121
|
-
|
|
121
|
+
isRefetching: false,
|
|
122
|
+
refetch: refetch || (async () => {
|
|
122
123
|
}),
|
|
123
124
|
error: error || null
|
|
124
125
|
};
|