@better-auth-ui/react 1.6.1 → 1.6.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/dist/components/auth/auth-provider.d.ts +4 -3
- package/dist/components/auth/auth-provider.js +24 -40
- package/dist/components/email/email-changed.d.ts +2 -2
- package/dist/components/email/email-changed.js +154 -68
- package/dist/components/email/email-localization.js +18 -23
- package/dist/components/email/email-styles.js +52 -77
- package/dist/components/email/email-verification.d.ts +2 -2
- package/dist/components/email/email-verification.js +138 -73
- package/dist/components/email/index.d.ts +9 -9
- package/dist/components/email/index.js +9 -9
- package/dist/components/email/magic-link.d.ts +2 -2
- package/dist/components/email/magic-link.js +139 -70
- package/dist/components/email/new-device.d.ts +2 -2
- package/dist/components/email/new-device.js +221 -88
- package/dist/components/email/otp-email.d.ts +2 -2
- package/dist/components/email/otp-email.js +127 -63
- package/dist/components/email/password-changed.d.ts +2 -2
- package/dist/components/email/password-changed.js +157 -74
- package/dist/components/email/reset-password.d.ts +2 -2
- package/dist/components/email/reset-password.js +138 -66
- package/dist/components/icons/apple.d.ts +1 -1
- package/dist/components/icons/apple.js +16 -9
- package/dist/components/icons/atlassian.d.ts +1 -1
- package/dist/components/icons/atlassian.js +38 -13
- package/dist/components/icons/cognito.d.ts +1 -1
- package/dist/components/icons/cognito.js +19 -9
- package/dist/components/icons/discord.d.ts +1 -1
- package/dist/components/icons/discord.js +16 -9
- package/dist/components/icons/dropbox.d.ts +1 -1
- package/dist/components/icons/dropbox.js +16 -9
- package/dist/components/icons/facebook.d.ts +1 -1
- package/dist/components/icons/facebook.js +19 -11
- package/dist/components/icons/figma.d.ts +1 -1
- package/dist/components/icons/figma.js +34 -12
- package/dist/components/icons/github.d.ts +1 -1
- package/dist/components/icons/github.js +16 -11
- package/dist/components/icons/gitlab.d.ts +1 -1
- package/dist/components/icons/gitlab.js +30 -9
- package/dist/components/icons/google.d.ts +1 -1
- package/dist/components/icons/google.js +39 -9
- package/dist/components/icons/huggingface.d.ts +1 -1
- package/dist/components/icons/huggingface.js +38 -9
- package/dist/components/icons/index.d.ts +35 -35
- package/dist/components/icons/index.js +35 -35
- package/dist/components/icons/kakao.d.ts +1 -1
- package/dist/components/icons/kakao.js +16 -11
- package/dist/components/icons/kick.d.ts +1 -1
- package/dist/components/icons/kick.js +20 -11
- package/dist/components/icons/line.d.ts +1 -1
- package/dist/components/icons/line.js +16 -9
- package/dist/components/icons/linear.d.ts +1 -1
- package/dist/components/icons/linear.js +16 -9
- package/dist/components/icons/linkedin.d.ts +1 -1
- package/dist/components/icons/linkedin.js +33 -9
- package/dist/components/icons/microsoft.d.ts +1 -1
- package/dist/components/icons/microsoft.js +30 -9
- package/dist/components/icons/naver.d.ts +1 -1
- package/dist/components/icons/naver.js +16 -9
- package/dist/components/icons/notion.d.ts +1 -1
- package/dist/components/icons/notion.js +16 -9
- package/dist/components/icons/paybin.d.ts +1 -1
- package/dist/components/icons/paybin.js +32 -8
- package/dist/components/icons/paypal.d.ts +1 -1
- package/dist/components/icons/paypal.js +30 -9
- package/dist/components/icons/polar.d.ts +1 -1
- package/dist/components/icons/polar.js +24 -9
- package/dist/components/icons/railway.d.ts +1 -1
- package/dist/components/icons/railway.js +16 -9
- package/dist/components/icons/reddit.d.ts +1 -1
- package/dist/components/icons/reddit.js +21 -9
- package/dist/components/icons/roblox.d.ts +1 -1
- package/dist/components/icons/roblox.js +17 -12
- package/dist/components/icons/salesforce.d.ts +1 -1
- package/dist/components/icons/salesforce.js +16 -9
- package/dist/components/icons/slack.d.ts +1 -1
- package/dist/components/icons/slack.js +30 -9
- package/dist/components/icons/spotify.d.ts +1 -1
- package/dist/components/icons/spotify.js +16 -9
- package/dist/components/icons/tiktok.d.ts +1 -1
- package/dist/components/icons/tiktok.js +23 -10
- package/dist/components/icons/twitch.d.ts +1 -1
- package/dist/components/icons/twitch.js +43 -12
- package/dist/components/icons/vercel.d.ts +1 -1
- package/dist/components/icons/vercel.js +16 -9
- package/dist/components/icons/vk.d.ts +1 -1
- package/dist/components/icons/vk.js +16 -9
- package/dist/components/icons/wechat.d.ts +1 -1
- package/dist/components/icons/wechat.js +16 -9
- package/dist/components/icons/x.d.ts +1 -1
- package/dist/components/icons/x.js +16 -9
- package/dist/components/icons/zoom.d.ts +1 -1
- package/dist/components/icons/zoom.js +69 -11
- package/dist/components/settings/account/theme-preview.js +286 -7
- package/dist/core.d.ts +1 -1
- package/dist/hooks/auth/use-authenticate.d.ts +30 -6
- package/dist/hooks/auth/use-authenticate.js +22 -27
- package/dist/hooks/auth/use-is-username-available.d.ts +20 -0
- package/dist/hooks/auth/use-is-username-available.js +13 -0
- package/dist/hooks/auth/use-request-password-reset.d.ts +12 -17
- package/dist/hooks/auth/use-request-password-reset.js +12 -13
- package/dist/hooks/auth/use-reset-password.d.ts +14 -31
- package/dist/hooks/auth/use-reset-password.js +12 -12
- package/dist/hooks/auth/use-send-verification-email.d.ts +11 -16
- package/dist/hooks/auth/use-send-verification-email.js +12 -12
- package/dist/hooks/auth/use-session.d.ts +31 -5
- package/dist/hooks/auth/use-session.js +15 -17
- package/dist/hooks/auth/use-sign-in-email.d.ts +12 -39
- package/dist/hooks/auth/use-sign-in-email.js +16 -24
- package/dist/hooks/auth/use-sign-in-magic-link.d.ts +15 -20
- package/dist/hooks/auth/use-sign-in-magic-link.js +12 -12
- package/dist/hooks/auth/use-sign-in-passkey.d.ts +13 -50
- package/dist/hooks/auth/use-sign-in-passkey.js +16 -24
- package/dist/hooks/auth/use-sign-in-social.d.ts +32 -62
- package/dist/hooks/auth/use-sign-in-social.js +12 -12
- package/dist/hooks/auth/use-sign-in-username.d.ts +25 -0
- package/dist/hooks/auth/use-sign-in-username.js +17 -0
- package/dist/hooks/auth/use-sign-out.d.ts +11 -12
- package/dist/hooks/auth/use-sign-out.js +15 -23
- package/dist/hooks/auth/use-sign-up-email.d.ts +178 -262
- package/dist/hooks/auth/use-sign-up-email.js +16 -24
- package/dist/hooks/auth/use-user.d.ts +63 -61
- package/dist/hooks/auth/use-user.js +10 -13
- package/dist/hooks/settings/use-account-info.d.ts +12 -12
- package/dist/hooks/settings/use-account-info.js +17 -24
- package/dist/hooks/settings/use-add-passkey.d.ts +11 -33
- package/dist/hooks/settings/use-add-passkey.js +16 -23
- package/dist/hooks/settings/use-change-email.d.ts +12 -15
- package/dist/hooks/settings/use-change-email.js +16 -22
- package/dist/hooks/settings/use-change-password.d.ts +12 -45
- package/dist/hooks/settings/use-change-password.js +12 -10
- package/dist/hooks/settings/use-delete-passkey.d.ts +11 -13
- package/dist/hooks/settings/use-delete-passkey.js +16 -23
- package/dist/hooks/settings/use-delete-user.d.ts +14 -32
- package/dist/hooks/settings/use-delete-user.js +12 -10
- package/dist/hooks/settings/use-link-social.d.ts +23 -26
- package/dist/hooks/settings/use-link-social.js +12 -9
- package/dist/hooks/settings/use-list-accounts.d.ts +10 -8
- package/dist/hooks/settings/use-list-accounts.js +14 -22
- package/dist/hooks/settings/use-list-device-sessions.d.ts +30 -7
- package/dist/hooks/settings/use-list-device-sessions.js +14 -21
- package/dist/hooks/settings/use-list-sessions.d.ts +10 -7
- package/dist/hooks/settings/use-list-sessions.js +14 -21
- package/dist/hooks/settings/use-list-user-passkeys.d.ts +9 -6
- package/dist/hooks/settings/use-list-user-passkeys.js +14 -21
- package/dist/hooks/settings/use-revoke-multi-session.d.ts +12 -12
- package/dist/hooks/settings/use-revoke-multi-session.js +16 -19
- package/dist/hooks/settings/use-revoke-session.d.ts +12 -12
- package/dist/hooks/settings/use-revoke-session.js +16 -20
- package/dist/hooks/settings/use-set-active-session.d.ts +13 -30
- package/dist/hooks/settings/use-set-active-session.js +19 -27
- package/dist/hooks/settings/use-unlink-account.d.ts +13 -13
- package/dist/hooks/settings/use-unlink-account.js +16 -20
- package/dist/hooks/settings/use-update-user.d.ts +1179 -5
- package/dist/hooks/settings/use-update-user.js +23 -28
- package/dist/hooks/use-auth-mutation.d.ts +12 -0
- package/dist/hooks/use-auth-mutation.js +11 -0
- package/dist/hooks/use-auth-query.d.ts +14 -0
- package/dist/hooks/use-auth-query.js +15 -0
- package/dist/index.d.ts +40 -36
- package/dist/index.js +84 -36
- package/dist/lib/auth-client.d.ts +1254 -1254
- package/dist/lib/auth-client.js +11 -11
- package/dist/lib/auth-config.d.ts +3 -3
- package/dist/lib/auth-context.d.ts +2 -2
- package/dist/lib/auth-context.js +5 -2
- package/dist/lib/provider-icons.d.ts +2 -2
- package/dist/lib/provider-icons.js +75 -47
- package/dist/lib/utils.d.ts +1 -1
- package/dist/lib/utils.js +7 -4
- package/dist/mutations/auth/is-username-available-options.d.ts +19 -0
- package/dist/mutations/auth/is-username-available-options.js +7 -0
- package/dist/mutations/auth/request-password-reset-options.d.ts +15 -0
- package/dist/mutations/auth/request-password-reset-options.js +7 -0
- package/dist/mutations/auth/reset-password-options.d.ts +17 -0
- package/dist/mutations/auth/reset-password-options.js +7 -0
- package/dist/mutations/auth/send-verification-email-options.d.ts +15 -0
- package/dist/mutations/auth/send-verification-email-options.js +7 -0
- package/dist/mutations/auth/sign-in-email-options.d.ts +23 -0
- package/dist/mutations/auth/sign-in-email-options.js +11 -0
- package/dist/mutations/auth/sign-in-magic-link-options.d.ts +23 -0
- package/dist/mutations/auth/sign-in-magic-link-options.js +11 -0
- package/dist/mutations/auth/sign-in-passkey-options.d.ts +15 -0
- package/dist/mutations/auth/sign-in-passkey-options.js +11 -0
- package/dist/mutations/auth/sign-in-social-options.d.ts +61 -0
- package/dist/mutations/auth/sign-in-social-options.js +11 -0
- package/dist/mutations/auth/sign-in-username-options.d.ts +19 -0
- package/dist/mutations/auth/sign-in-username-options.js +11 -0
- package/dist/mutations/auth/sign-out-options.d.ts +12 -0
- package/dist/mutations/auth/sign-out-options.js +7 -0
- package/dist/mutations/auth/sign-up-email-options.d.ts +1180 -0
- package/dist/mutations/auth/sign-up-email-options.js +11 -0
- package/dist/mutations/auth-mutation-options.d.ts +25 -0
- package/dist/mutations/auth-mutation-options.js +19 -0
- package/dist/mutations/settings/add-passkey-options.d.ts +15 -0
- package/dist/mutations/settings/add-passkey-options.js +11 -0
- package/dist/mutations/settings/change-email-options.d.ts +15 -0
- package/dist/mutations/settings/change-email-options.js +7 -0
- package/dist/mutations/settings/change-password-options.d.ts +17 -0
- package/dist/mutations/settings/change-password-options.js +7 -0
- package/dist/mutations/settings/delete-passkey-options.d.ts +13 -0
- package/dist/mutations/settings/delete-passkey-options.js +11 -0
- package/dist/mutations/settings/delete-user-options.d.ts +20 -0
- package/dist/mutations/settings/delete-user-options.js +7 -0
- package/dist/mutations/settings/link-social-options.d.ts +39 -0
- package/dist/mutations/settings/link-social-options.js +7 -0
- package/dist/mutations/settings/revoke-multi-session-options.d.ts +13 -0
- package/dist/mutations/settings/revoke-multi-session-options.js +11 -0
- package/dist/mutations/settings/revoke-session-options.d.ts +13 -0
- package/dist/mutations/settings/revoke-session-options.js +7 -0
- package/dist/mutations/settings/set-active-session-options.d.ts +13 -0
- package/dist/mutations/settings/set-active-session-options.js +11 -0
- package/dist/mutations/settings/unlink-account-options.d.ts +15 -0
- package/dist/mutations/settings/unlink-account-options.js +7 -0
- package/dist/mutations/settings/update-user-options.d.ts +1182 -0
- package/dist/mutations/settings/update-user-options.js +7 -0
- package/dist/queries/auth/session-options.d.ts +110 -0
- package/dist/queries/auth/session-options.js +7 -0
- package/dist/queries/auth-query-options.d.ts +29 -0
- package/dist/queries/auth-query-options.js +17 -0
- package/dist/queries/settings/account-info-options.d.ts +32 -0
- package/dist/queries/settings/account-info-options.js +12 -0
- package/dist/queries/settings/list-accounts-options.d.ts +53 -0
- package/dist/queries/settings/list-accounts-options.js +12 -0
- package/dist/queries/settings/list-device-sessions-options.d.ts +99 -0
- package/dist/queries/settings/list-device-sessions-options.js +12 -0
- package/dist/queries/settings/list-sessions-options.d.ts +54 -0
- package/dist/queries/settings/list-sessions-options.js +12 -0
- package/dist/queries/settings/list-user-passkeys-options.d.ts +18 -0
- package/dist/queries/settings/list-user-passkeys-options.js +12 -0
- package/package.json +11 -11
- package/src/components/auth/auth-provider.tsx +4 -6
- package/src/hooks/auth/use-authenticate.ts +8 -9
- package/src/hooks/auth/use-is-username-available.ts +31 -0
- package/src/hooks/auth/use-request-password-reset.ts +20 -11
- package/src/hooks/auth/use-reset-password.ts +20 -12
- package/src/hooks/auth/use-send-verification-email.ts +19 -11
- package/src/hooks/auth/use-session.ts +22 -17
- package/src/hooks/auth/use-sign-in-email.ts +24 -19
- package/src/hooks/auth/use-sign-in-magic-link.ts +19 -13
- package/src/hooks/auth/use-sign-in-passkey.ts +24 -18
- package/src/hooks/auth/use-sign-in-social.ts +19 -11
- package/src/hooks/auth/use-sign-in-username.ts +40 -0
- package/src/hooks/auth/use-sign-out.ts +20 -20
- package/src/hooks/auth/use-sign-up-email.ts +25 -21
- package/src/hooks/auth/use-user.ts +7 -9
- package/src/hooks/settings/use-account-info.ts +31 -21
- package/src/hooks/settings/use-add-passkey.ts +22 -17
- package/src/hooks/settings/use-change-email.ts +24 -20
- package/src/hooks/settings/use-change-password.ts +19 -11
- package/src/hooks/settings/use-delete-passkey.ts +21 -16
- package/src/hooks/settings/use-delete-user.ts +19 -11
- package/src/hooks/settings/use-link-social.ts +20 -10
- package/src/hooks/settings/use-list-accounts.ts +28 -16
- package/src/hooks/settings/use-list-device-sessions.ts +29 -22
- package/src/hooks/settings/use-list-sessions.ts +28 -15
- package/src/hooks/settings/use-list-user-passkeys.ts +28 -17
- package/src/hooks/settings/use-revoke-multi-session.ts +28 -19
- package/src/hooks/settings/use-revoke-session.ts +26 -18
- package/src/hooks/settings/use-set-active-session.ts +40 -28
- package/src/hooks/settings/use-unlink-account.ts +23 -17
- package/src/hooks/settings/use-update-user.ts +33 -27
- package/src/hooks/use-auth-mutation.ts +29 -0
- package/src/hooks/use-auth-query.ts +36 -0
- package/src/index.ts +4 -0
- package/src/lib/auth-config.ts +1 -1
- package/src/mutations/auth/is-username-available-options.ts +18 -0
- package/src/mutations/auth/request-password-reset-options.ts +14 -0
- package/src/mutations/auth/reset-password-options.ts +14 -0
- package/src/mutations/auth/send-verification-email-options.ts +14 -0
- package/src/mutations/auth/sign-in-email-options.ts +19 -0
- package/src/mutations/auth/sign-in-magic-link-options.ts +15 -0
- package/src/mutations/auth/sign-in-passkey-options.ts +15 -0
- package/src/mutations/auth/sign-in-social-options.ts +19 -0
- package/src/mutations/auth/sign-in-username-options.ts +15 -0
- package/src/mutations/auth/sign-out-options.ts +11 -0
- package/src/mutations/auth/sign-up-email-options.ts +15 -0
- package/src/mutations/auth-mutation-options.ts +49 -0
- package/src/mutations/settings/add-passkey-options.ts +15 -0
- package/src/mutations/settings/change-email-options.ts +11 -0
- package/src/mutations/settings/change-password-options.ts +14 -0
- package/src/mutations/settings/delete-passkey-options.ts +15 -0
- package/src/mutations/settings/delete-user-options.ts +11 -0
- package/src/mutations/settings/link-social-options.ts +11 -0
- package/src/mutations/settings/revoke-multi-session-options.ts +15 -0
- package/src/mutations/settings/revoke-session-options.ts +14 -0
- package/src/mutations/settings/set-active-session-options.ts +15 -0
- package/src/mutations/settings/unlink-account-options.ts +14 -0
- package/src/mutations/settings/update-user-options.ts +15 -0
- package/src/queries/auth/session-options.ts +18 -0
- package/src/queries/auth-query-options.ts +34 -0
- package/src/queries/settings/account-info-options.ts +25 -0
- package/src/queries/settings/list-accounts-options.ts +26 -0
- package/src/queries/settings/list-device-sessions-options.ts +24 -0
- package/src/queries/settings/list-sessions-options.ts +23 -0
- package/src/queries/settings/list-user-passkeys-options.ts +23 -0
- package/dist/hooks/auth/use-auth-mutation.d.ts +0 -18
- package/dist/hooks/auth/use-auth-mutation.js +0 -10
- package/dist/hooks/auth/use-auth-query.d.ts +0 -24
- package/dist/hooks/auth/use-auth-query.js +0 -10
- package/dist/lib/auth-config.js +0 -1
- package/src/hooks/auth/use-auth-mutation.ts +0 -56
- package/src/hooks/auth/use-auth-query.ts +0 -50
package/dist/lib/auth-client.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { passkeyClient } from "@better-auth/passkey/client";
|
|
2
|
-
import { magicLinkClient, multiSessionClient, usernameClient } from "better-auth/client/plugins";
|
|
3
|
-
import { createAuthClient } from "better-auth/react";
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
1
|
+
import { passkeyClient as e } from "@better-auth/passkey/client";
|
|
2
|
+
import { magicLinkClient as t, multiSessionClient as n, usernameClient as r } from "better-auth/client/plugins";
|
|
3
|
+
import { createAuthClient as i } from "better-auth/react";
|
|
4
|
+
//#region src/lib/auth-client.ts
|
|
5
|
+
i({ plugins: [
|
|
6
|
+
t(),
|
|
7
|
+
n(),
|
|
8
|
+
e(),
|
|
9
|
+
r()
|
|
10
|
+
] });
|
|
11
|
+
//#endregion
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import { AuthConfig as BaseAuthConfig } from '@better-auth-ui/core';
|
|
2
|
+
import { ComponentType, PropsWithChildren } from 'react';
|
|
3
|
+
import { AnyAuthClient, AuthClient } from './auth-client';
|
|
4
4
|
/**
|
|
5
5
|
* Extends the base AuthConfig with React-specific requirements including
|
|
6
6
|
* an authClient instance and a Link component for navigation.
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import
|
|
2
|
-
export declare const AuthContext: import(
|
|
1
|
+
import { AuthConfig } from './auth-config';
|
|
2
|
+
export declare const AuthContext: import('react').Context<AuthConfig | undefined>;
|
package/dist/lib/auth-context.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
1
|
+
import { SocialProvider } from 'better-auth/social-providers';
|
|
2
|
+
import { ComponentPropsWithRef, ComponentType } from 'react';
|
|
3
3
|
/**
|
|
4
4
|
* Mapping of social authentication provider names to their corresponding icon components.
|
|
5
5
|
*
|
|
@@ -1,48 +1,76 @@
|
|
|
1
|
-
import { Apple
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
1
|
+
import { Apple as e } from "../components/icons/apple.js";
|
|
2
|
+
import { Atlassian as t } from "../components/icons/atlassian.js";
|
|
3
|
+
import { Cognito as n } from "../components/icons/cognito.js";
|
|
4
|
+
import { Discord as r } from "../components/icons/discord.js";
|
|
5
|
+
import { Dropbox as i } from "../components/icons/dropbox.js";
|
|
6
|
+
import { Facebook as a } from "../components/icons/facebook.js";
|
|
7
|
+
import { Figma as o } from "../components/icons/figma.js";
|
|
8
|
+
import { GitHub as s } from "../components/icons/github.js";
|
|
9
|
+
import { GitLab as c } from "../components/icons/gitlab.js";
|
|
10
|
+
import { Google as l } from "../components/icons/google.js";
|
|
11
|
+
import { HuggingFace as u } from "../components/icons/huggingface.js";
|
|
12
|
+
import { Kakao as d } from "../components/icons/kakao.js";
|
|
13
|
+
import { Kick as f } from "../components/icons/kick.js";
|
|
14
|
+
import { Line as p } from "../components/icons/line.js";
|
|
15
|
+
import { Linear as m } from "../components/icons/linear.js";
|
|
16
|
+
import { LinkedIn as h } from "../components/icons/linkedin.js";
|
|
17
|
+
import { Microsoft as g } from "../components/icons/microsoft.js";
|
|
18
|
+
import { Naver as _ } from "../components/icons/naver.js";
|
|
19
|
+
import { Notion as v } from "../components/icons/notion.js";
|
|
20
|
+
import { Paybin as y } from "../components/icons/paybin.js";
|
|
21
|
+
import { PayPal as b } from "../components/icons/paypal.js";
|
|
22
|
+
import { Polar as x } from "../components/icons/polar.js";
|
|
23
|
+
import { Railway as S } from "../components/icons/railway.js";
|
|
24
|
+
import { Reddit as C } from "../components/icons/reddit.js";
|
|
25
|
+
import { Roblox as w } from "../components/icons/roblox.js";
|
|
26
|
+
import { Salesforce as T } from "../components/icons/salesforce.js";
|
|
27
|
+
import { Slack as E } from "../components/icons/slack.js";
|
|
28
|
+
import { Spotify as D } from "../components/icons/spotify.js";
|
|
29
|
+
import { TikTok as O } from "../components/icons/tiktok.js";
|
|
30
|
+
import { Twitch as k } from "../components/icons/twitch.js";
|
|
31
|
+
import { Vercel as A } from "../components/icons/vercel.js";
|
|
32
|
+
import { VK as j } from "../components/icons/vk.js";
|
|
33
|
+
import { WeChat as M } from "../components/icons/wechat.js";
|
|
34
|
+
import { X as N } from "../components/icons/x.js";
|
|
35
|
+
import { Zoom as P } from "../components/icons/zoom.js";
|
|
36
|
+
import "../components/icons/index.js";
|
|
37
|
+
//#region src/lib/provider-icons.ts
|
|
38
|
+
var F = {
|
|
39
|
+
apple: e,
|
|
40
|
+
atlassian: t,
|
|
41
|
+
cognito: n,
|
|
42
|
+
discord: r,
|
|
43
|
+
dropbox: i,
|
|
44
|
+
facebook: a,
|
|
45
|
+
figma: o,
|
|
46
|
+
github: s,
|
|
47
|
+
gitlab: c,
|
|
48
|
+
google: l,
|
|
49
|
+
huggingface: u,
|
|
50
|
+
kakao: d,
|
|
51
|
+
kick: f,
|
|
52
|
+
line: p,
|
|
53
|
+
linear: m,
|
|
54
|
+
linkedin: h,
|
|
55
|
+
microsoft: g,
|
|
56
|
+
naver: _,
|
|
57
|
+
notion: v,
|
|
58
|
+
paybin: y,
|
|
59
|
+
paypal: b,
|
|
60
|
+
polar: x,
|
|
61
|
+
railway: S,
|
|
62
|
+
reddit: C,
|
|
63
|
+
roblox: w,
|
|
64
|
+
salesforce: T,
|
|
65
|
+
slack: E,
|
|
66
|
+
spotify: D,
|
|
67
|
+
tiktok: O,
|
|
68
|
+
twitch: k,
|
|
69
|
+
twitter: N,
|
|
70
|
+
vercel: A,
|
|
71
|
+
vk: j,
|
|
72
|
+
wechat: M,
|
|
73
|
+
zoom: P
|
|
48
74
|
};
|
|
75
|
+
//#endregion
|
|
76
|
+
export { F as providerIcons };
|
package/dist/lib/utils.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ClassValue } from 'clsx';
|
|
2
2
|
export declare function cn(...inputs: ClassValue[]): string;
|
package/dist/lib/utils.js
CHANGED
|
@@ -1,5 +1,8 @@
|
|
|
1
|
-
import { clsx } from "clsx";
|
|
2
|
-
import { twMerge } from "tailwind-merge";
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
import { clsx as e } from "clsx";
|
|
2
|
+
import { twMerge as t } from "tailwind-merge";
|
|
3
|
+
//#region src/lib/utils.ts
|
|
4
|
+
function n(...n) {
|
|
5
|
+
return t(e(n));
|
|
5
6
|
}
|
|
7
|
+
//#endregion
|
|
8
|
+
export { n as cn };
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { AuthClient } from '../../lib/auth-client';
|
|
2
|
+
/**
|
|
3
|
+
* Mutation options factory for checking username availability.
|
|
4
|
+
*
|
|
5
|
+
* Modeled as a mutation because callers typically trigger the check on
|
|
6
|
+
* user action (debounced input, form submit) rather than on mount.
|
|
7
|
+
*
|
|
8
|
+
* @param authClient - The Better Auth client.
|
|
9
|
+
*/
|
|
10
|
+
export declare function isUsernameAvailableOptions(authClient: AuthClient): import('@tanstack/react-query').WithRequired<import('@tanstack/react-query').UseMutationOptions<{
|
|
11
|
+
available: boolean;
|
|
12
|
+
message: string | null;
|
|
13
|
+
}, import('better-auth/client').BetterFetchError, import('better-auth').Prettify<{
|
|
14
|
+
username: string;
|
|
15
|
+
} & {
|
|
16
|
+
fetchOptions?: import('better-auth').ClientFetchOption<Partial<{
|
|
17
|
+
username: string;
|
|
18
|
+
}> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined> | undefined;
|
|
19
|
+
}>, unknown>, "mutationKey">;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { authMutationOptions as e } from "../auth-mutation-options.js";
|
|
2
|
+
//#region src/mutations/auth/is-username-available-options.ts
|
|
3
|
+
function t(t) {
|
|
4
|
+
return e(t.isUsernameAvailable, ["auth", "isUsernameAvailable"]);
|
|
5
|
+
}
|
|
6
|
+
//#endregion
|
|
7
|
+
export { t as isUsernameAvailableOptions };
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { AuthClient } from '../../lib/auth-client';
|
|
2
|
+
/**
|
|
3
|
+
* Mutation options factory for requesting a password reset email.
|
|
4
|
+
*
|
|
5
|
+
* @param authClient - The Better Auth client.
|
|
6
|
+
*/
|
|
7
|
+
export declare function requestPasswordResetOptions(authClient: AuthClient): import('@tanstack/react-query').WithRequired<import('@tanstack/react-query').UseMutationOptions<never, import('better-auth/client').BetterFetchError, import('better-auth').Prettify<{
|
|
8
|
+
email: string;
|
|
9
|
+
redirectTo?: string | undefined;
|
|
10
|
+
} & {
|
|
11
|
+
fetchOptions?: import('better-auth').ClientFetchOption<Partial<{
|
|
12
|
+
email: string;
|
|
13
|
+
redirectTo?: string | undefined;
|
|
14
|
+
}> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined> | undefined;
|
|
15
|
+
}>, unknown>, "mutationKey">;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { authMutationOptions as e } from "../auth-mutation-options.js";
|
|
2
|
+
//#region src/mutations/auth/request-password-reset-options.ts
|
|
3
|
+
function t(t) {
|
|
4
|
+
return e(t.requestPasswordReset, ["auth", "requestPasswordReset"]);
|
|
5
|
+
}
|
|
6
|
+
//#endregion
|
|
7
|
+
export { t as requestPasswordResetOptions };
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { AuthClient } from '../../lib/auth-client';
|
|
2
|
+
/**
|
|
3
|
+
* Mutation options factory for completing a password reset.
|
|
4
|
+
*
|
|
5
|
+
* @param authClient - The Better Auth client.
|
|
6
|
+
*/
|
|
7
|
+
export declare function resetPasswordOptions(authClient: AuthClient): import('@tanstack/react-query').WithRequired<import('@tanstack/react-query').UseMutationOptions<never, import('better-auth/client').BetterFetchError, import('better-auth').Prettify<{
|
|
8
|
+
newPassword: string;
|
|
9
|
+
token?: string | undefined;
|
|
10
|
+
} & {
|
|
11
|
+
fetchOptions?: import('better-auth').ClientFetchOption<Partial<{
|
|
12
|
+
newPassword: string;
|
|
13
|
+
token?: string | undefined;
|
|
14
|
+
}> & Record<string, any>, Partial<{
|
|
15
|
+
token?: string | undefined;
|
|
16
|
+
}> & Record<string, any>, Record<string, any> | undefined> | undefined;
|
|
17
|
+
}>, unknown>, "mutationKey">;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { AuthClient } from '../../lib/auth-client';
|
|
2
|
+
/**
|
|
3
|
+
* Mutation options factory for sending a verification email.
|
|
4
|
+
*
|
|
5
|
+
* @param authClient - The Better Auth client.
|
|
6
|
+
*/
|
|
7
|
+
export declare function sendVerificationEmailOptions(authClient: AuthClient): import('@tanstack/react-query').WithRequired<import('@tanstack/react-query').UseMutationOptions<never, import('better-auth/client').BetterFetchError, import('better-auth').Prettify<{
|
|
8
|
+
email: string;
|
|
9
|
+
callbackURL?: string | undefined;
|
|
10
|
+
} & {
|
|
11
|
+
fetchOptions?: import('better-auth').ClientFetchOption<Partial<{
|
|
12
|
+
email: string;
|
|
13
|
+
callbackURL?: string | undefined;
|
|
14
|
+
}> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined> | undefined;
|
|
15
|
+
}>, unknown>, "mutationKey">;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { authMutationOptions as e } from "../auth-mutation-options.js";
|
|
2
|
+
//#region src/mutations/auth/send-verification-email-options.ts
|
|
3
|
+
function t(t) {
|
|
4
|
+
return e(t.sendVerificationEmail, ["auth", "sendVerificationEmail"]);
|
|
5
|
+
}
|
|
6
|
+
//#endregion
|
|
7
|
+
export { t as sendVerificationEmailOptions };
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { AuthClient } from '../../lib/auth-client';
|
|
2
|
+
/**
|
|
3
|
+
* Mutation options factory for email/password sign-in.
|
|
4
|
+
*
|
|
5
|
+
* The returned `mutationKey` (`["auth", "signIn", "email"]`) is stable and
|
|
6
|
+
* can be passed to `useIsMutating` or matched inside a global
|
|
7
|
+
* `MutationCache` observer for toast handling.
|
|
8
|
+
*
|
|
9
|
+
* @param authClient - The Better Auth client.
|
|
10
|
+
*/
|
|
11
|
+
export declare function signInEmailOptions(authClient: AuthClient): import('@tanstack/react-query').WithRequired<import('@tanstack/react-query').UseMutationOptions<never, import('better-auth/client').BetterFetchError, import('better-auth').Prettify<{
|
|
12
|
+
email: string;
|
|
13
|
+
password: string;
|
|
14
|
+
callbackURL?: string | undefined;
|
|
15
|
+
rememberMe?: boolean | undefined;
|
|
16
|
+
} & {
|
|
17
|
+
fetchOptions?: import('better-auth').ClientFetchOption<Partial<{
|
|
18
|
+
email: string;
|
|
19
|
+
password: string;
|
|
20
|
+
callbackURL?: string | undefined;
|
|
21
|
+
rememberMe?: boolean | undefined;
|
|
22
|
+
}> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined> | undefined;
|
|
23
|
+
}>, unknown>, "mutationKey">;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { authMutationOptions as e } from "../auth-mutation-options.js";
|
|
2
|
+
//#region src/mutations/auth/sign-in-email-options.ts
|
|
3
|
+
function t(t) {
|
|
4
|
+
return e(t.signIn.email, [
|
|
5
|
+
"auth",
|
|
6
|
+
"signIn",
|
|
7
|
+
"email"
|
|
8
|
+
]);
|
|
9
|
+
}
|
|
10
|
+
//#endregion
|
|
11
|
+
export { t as signInEmailOptions };
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { AuthClient } from '../../lib/auth-client';
|
|
2
|
+
/**
|
|
3
|
+
* Mutation options factory for magic-link sign-in.
|
|
4
|
+
*
|
|
5
|
+
* @param authClient - The Better Auth client.
|
|
6
|
+
*/
|
|
7
|
+
export declare function signInMagicLinkOptions(authClient: AuthClient): import('@tanstack/react-query').WithRequired<import('@tanstack/react-query').UseMutationOptions<never, import('better-auth/client').BetterFetchError, import('better-auth').Prettify<{
|
|
8
|
+
email: string;
|
|
9
|
+
name?: string | undefined;
|
|
10
|
+
callbackURL?: string | undefined;
|
|
11
|
+
newUserCallbackURL?: string | undefined;
|
|
12
|
+
errorCallbackURL?: string | undefined;
|
|
13
|
+
metadata?: Record<string, any> | undefined;
|
|
14
|
+
} & {
|
|
15
|
+
fetchOptions?: import('better-auth').ClientFetchOption<Partial<{
|
|
16
|
+
email: string;
|
|
17
|
+
name?: string | undefined;
|
|
18
|
+
callbackURL?: string | undefined;
|
|
19
|
+
newUserCallbackURL?: string | undefined;
|
|
20
|
+
errorCallbackURL?: string | undefined;
|
|
21
|
+
metadata?: Record<string, any> | undefined;
|
|
22
|
+
}> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined> | undefined;
|
|
23
|
+
}>, unknown>, "mutationKey">;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { authMutationOptions as e } from "../auth-mutation-options.js";
|
|
2
|
+
//#region src/mutations/auth/sign-in-magic-link-options.ts
|
|
3
|
+
function t(t) {
|
|
4
|
+
return e(t.signIn.magicLink, [
|
|
5
|
+
"auth",
|
|
6
|
+
"signIn",
|
|
7
|
+
"magicLink"
|
|
8
|
+
]);
|
|
9
|
+
}
|
|
10
|
+
//#endregion
|
|
11
|
+
export { t as signInMagicLinkOptions };
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { AuthClient } from '../../lib/auth-client';
|
|
2
|
+
/**
|
|
3
|
+
* Mutation options factory for passkey sign-in.
|
|
4
|
+
*
|
|
5
|
+
* @param authClient - The Better Auth client.
|
|
6
|
+
*/
|
|
7
|
+
export declare function signInPasskeyOptions(authClient: AuthClient): import('@tanstack/react-query').WithRequired<import('@tanstack/react-query').UseMutationOptions<{
|
|
8
|
+
session: import('better-auth').Session;
|
|
9
|
+
user: import('better-auth').User;
|
|
10
|
+
} | null, import('better-auth/client').BetterFetchError, void | {
|
|
11
|
+
autoFill?: boolean;
|
|
12
|
+
extensions?: import('@better-auth/passkey/client').AuthenticationExtensionsClientInputs;
|
|
13
|
+
returnWebAuthnResponse?: boolean;
|
|
14
|
+
fetchOptions?: import('better-auth').ClientFetchOption;
|
|
15
|
+
}, unknown>, "mutationKey">;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { authMutationOptions as e } from "../auth-mutation-options.js";
|
|
2
|
+
//#region src/mutations/auth/sign-in-passkey-options.ts
|
|
3
|
+
function t(t) {
|
|
4
|
+
return e(t.signIn.passkey, [
|
|
5
|
+
"auth",
|
|
6
|
+
"signIn",
|
|
7
|
+
"passkey"
|
|
8
|
+
]);
|
|
9
|
+
}
|
|
10
|
+
//#endregion
|
|
11
|
+
export { t as signInPasskeyOptions };
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import { AuthClient } from '../../lib/auth-client';
|
|
2
|
+
/**
|
|
3
|
+
* Mutation options factory for social sign-in.
|
|
4
|
+
*
|
|
5
|
+
* The returned `mutationKey` (`["auth", "signIn", "social"]`) is stable and
|
|
6
|
+
* can be passed to `useIsMutating` or matched inside a global
|
|
7
|
+
* `MutationCache` observer for toast handling.
|
|
8
|
+
*
|
|
9
|
+
* @param authClient - The Better Auth client.
|
|
10
|
+
*/
|
|
11
|
+
export declare function signInSocialOptions(authClient: AuthClient): import('@tanstack/react-query').WithRequired<import('@tanstack/react-query').UseMutationOptions<never, import('better-auth/client').BetterFetchError, import('better-auth').Prettify<{
|
|
12
|
+
provider: (string & {}) | "linear" | "huggingface" | "github" | "apple" | "atlassian" | "cognito" | "discord" | "facebook" | "figma" | "microsoft" | "google" | "slack" | "spotify" | "twitch" | "twitter" | "dropbox" | "kick" | "linkedin" | "gitlab" | "tiktok" | "reddit" | "roblox" | "salesforce" | "vk" | "zoom" | "notion" | "kakao" | "naver" | "line" | "paybin" | "paypal" | "polar" | "railway" | "vercel" | "wechat";
|
|
13
|
+
callbackURL?: string | undefined;
|
|
14
|
+
newUserCallbackURL?: string | undefined;
|
|
15
|
+
errorCallbackURL?: string | undefined;
|
|
16
|
+
disableRedirect?: boolean | undefined;
|
|
17
|
+
idToken?: {
|
|
18
|
+
token: string;
|
|
19
|
+
nonce?: string | undefined;
|
|
20
|
+
accessToken?: string | undefined;
|
|
21
|
+
refreshToken?: string | undefined;
|
|
22
|
+
expiresAt?: number | undefined;
|
|
23
|
+
user?: {
|
|
24
|
+
name?: {
|
|
25
|
+
firstName?: string | undefined;
|
|
26
|
+
lastName?: string | undefined;
|
|
27
|
+
} | undefined;
|
|
28
|
+
email?: string | undefined;
|
|
29
|
+
} | undefined;
|
|
30
|
+
} | undefined;
|
|
31
|
+
scopes?: string[] | undefined;
|
|
32
|
+
requestSignUp?: boolean | undefined;
|
|
33
|
+
loginHint?: string | undefined;
|
|
34
|
+
additionalData?: Record<string, any> | undefined;
|
|
35
|
+
} & {
|
|
36
|
+
fetchOptions?: import('better-auth').ClientFetchOption<Partial<{
|
|
37
|
+
provider: (string & {}) | "linear" | "huggingface" | "github" | "apple" | "atlassian" | "cognito" | "discord" | "facebook" | "figma" | "microsoft" | "google" | "slack" | "spotify" | "twitch" | "twitter" | "dropbox" | "kick" | "linkedin" | "gitlab" | "tiktok" | "reddit" | "roblox" | "salesforce" | "vk" | "zoom" | "notion" | "kakao" | "naver" | "line" | "paybin" | "paypal" | "polar" | "railway" | "vercel" | "wechat";
|
|
38
|
+
callbackURL?: string | undefined;
|
|
39
|
+
newUserCallbackURL?: string | undefined;
|
|
40
|
+
errorCallbackURL?: string | undefined;
|
|
41
|
+
disableRedirect?: boolean | undefined;
|
|
42
|
+
idToken?: {
|
|
43
|
+
token: string;
|
|
44
|
+
nonce?: string | undefined;
|
|
45
|
+
accessToken?: string | undefined;
|
|
46
|
+
refreshToken?: string | undefined;
|
|
47
|
+
expiresAt?: number | undefined;
|
|
48
|
+
user?: {
|
|
49
|
+
name?: {
|
|
50
|
+
firstName?: string | undefined;
|
|
51
|
+
lastName?: string | undefined;
|
|
52
|
+
} | undefined;
|
|
53
|
+
email?: string | undefined;
|
|
54
|
+
} | undefined;
|
|
55
|
+
} | undefined;
|
|
56
|
+
scopes?: string[] | undefined;
|
|
57
|
+
requestSignUp?: boolean | undefined;
|
|
58
|
+
loginHint?: string | undefined;
|
|
59
|
+
additionalData?: Record<string, any> | undefined;
|
|
60
|
+
}> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined> | undefined;
|
|
61
|
+
}>, unknown>, "mutationKey">;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { authMutationOptions as e } from "../auth-mutation-options.js";
|
|
2
|
+
//#region src/mutations/auth/sign-in-social-options.ts
|
|
3
|
+
function t(t) {
|
|
4
|
+
return e(t.signIn.social, [
|
|
5
|
+
"auth",
|
|
6
|
+
"signIn",
|
|
7
|
+
"social"
|
|
8
|
+
]);
|
|
9
|
+
}
|
|
10
|
+
//#endregion
|
|
11
|
+
export { t as signInSocialOptions };
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { AuthClient } from '../../lib/auth-client';
|
|
2
|
+
/**
|
|
3
|
+
* Mutation options factory for username/password sign-in.
|
|
4
|
+
*
|
|
5
|
+
* @param authClient - The Better Auth client.
|
|
6
|
+
*/
|
|
7
|
+
export declare function signInUsernameOptions(authClient: AuthClient): import('@tanstack/react-query').WithRequired<import('@tanstack/react-query').UseMutationOptions<never, import('better-auth/client').BetterFetchError, import('better-auth').Prettify<{
|
|
8
|
+
username: string;
|
|
9
|
+
password: string;
|
|
10
|
+
rememberMe?: boolean | undefined;
|
|
11
|
+
callbackURL?: string | undefined;
|
|
12
|
+
} & {
|
|
13
|
+
fetchOptions?: import('better-auth').ClientFetchOption<Partial<{
|
|
14
|
+
username: string;
|
|
15
|
+
password: string;
|
|
16
|
+
rememberMe?: boolean | undefined;
|
|
17
|
+
callbackURL?: string | undefined;
|
|
18
|
+
}> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined> | undefined;
|
|
19
|
+
}>, unknown>, "mutationKey">;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { authMutationOptions as e } from "../auth-mutation-options.js";
|
|
2
|
+
//#region src/mutations/auth/sign-in-username-options.ts
|
|
3
|
+
function t(t) {
|
|
4
|
+
return e(t.signIn.username, [
|
|
5
|
+
"auth",
|
|
6
|
+
"signIn",
|
|
7
|
+
"username"
|
|
8
|
+
]);
|
|
9
|
+
}
|
|
10
|
+
//#endregion
|
|
11
|
+
export { t as signInUsernameOptions };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { AuthClient } from '../../lib/auth-client';
|
|
2
|
+
/**
|
|
3
|
+
* Mutation options factory for signing out.
|
|
4
|
+
*
|
|
5
|
+
* @param authClient - The Better Auth client.
|
|
6
|
+
*/
|
|
7
|
+
export declare function signOutOptions(authClient: AuthClient): import('@tanstack/react-query').WithRequired<import('@tanstack/react-query').UseMutationOptions<{
|
|
8
|
+
success: boolean;
|
|
9
|
+
} | null, import('better-auth/client').BetterFetchError, void | import('better-auth').Prettify<{
|
|
10
|
+
query?: Record<string, any> | undefined;
|
|
11
|
+
fetchOptions?: import('better-auth').ClientFetchOption<never, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined> | undefined;
|
|
12
|
+
}>, unknown>, "mutationKey">;
|