@better-auth-ui/react 1.6.0
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 +32 -0
- package/dist/components/auth/auth-provider.js +44 -0
- package/dist/components/email/email-changed.d.ts +97 -0
- package/dist/components/email/email-changed.js +70 -0
- package/dist/components/email/email-localization.d.ts +61 -0
- package/dist/components/email/email-localization.js +24 -0
- package/dist/components/email/email-styles.d.ts +89 -0
- package/dist/components/email/email-styles.js +129 -0
- package/dist/components/email/email-verification.d.ts +97 -0
- package/dist/components/email/email-verification.js +75 -0
- package/dist/components/email/index.d.ts +9 -0
- package/dist/components/email/index.js +9 -0
- package/dist/components/email/magic-link.d.ts +93 -0
- package/dist/components/email/magic-link.js +72 -0
- package/dist/components/email/new-device.d.ts +123 -0
- package/dist/components/email/new-device.js +90 -0
- package/dist/components/email/otp-email.d.ts +88 -0
- package/dist/components/email/otp-email.js +65 -0
- package/dist/components/email/password-changed.d.ts +96 -0
- package/dist/components/email/password-changed.js +76 -0
- package/dist/components/email/reset-password.d.ts +90 -0
- package/dist/components/email/reset-password.js +68 -0
- package/dist/components/icons/apple.d.ts +8 -0
- package/dist/components/icons/apple.js +10 -0
- package/dist/components/icons/atlassian.d.ts +10 -0
- package/dist/components/icons/atlassian.js +14 -0
- package/dist/components/icons/cognito.d.ts +8 -0
- package/dist/components/icons/cognito.js +10 -0
- package/dist/components/icons/discord.d.ts +8 -0
- package/dist/components/icons/discord.js +10 -0
- package/dist/components/icons/dropbox.d.ts +8 -0
- package/dist/components/icons/dropbox.js +10 -0
- package/dist/components/icons/facebook.d.ts +10 -0
- package/dist/components/icons/facebook.js +12 -0
- package/dist/components/icons/figma.d.ts +11 -0
- package/dist/components/icons/figma.js +13 -0
- package/dist/components/icons/github.d.ts +10 -0
- package/dist/components/icons/github.js +12 -0
- package/dist/components/icons/gitlab.d.ts +8 -0
- package/dist/components/icons/gitlab.js +10 -0
- package/dist/components/icons/google.d.ts +8 -0
- package/dist/components/icons/google.js +10 -0
- package/dist/components/icons/huggingface.d.ts +8 -0
- package/dist/components/icons/huggingface.js +10 -0
- package/dist/components/icons/index.d.ts +35 -0
- package/dist/components/icons/index.js +35 -0
- package/dist/components/icons/kakao.d.ts +10 -0
- package/dist/components/icons/kakao.js +12 -0
- package/dist/components/icons/kick.d.ts +10 -0
- package/dist/components/icons/kick.js +12 -0
- package/dist/components/icons/line.d.ts +8 -0
- package/dist/components/icons/line.js +10 -0
- package/dist/components/icons/linear.d.ts +8 -0
- package/dist/components/icons/linear.js +10 -0
- package/dist/components/icons/linkedin.d.ts +8 -0
- package/dist/components/icons/linkedin.js +10 -0
- package/dist/components/icons/microsoft.d.ts +8 -0
- package/dist/components/icons/microsoft.js +10 -0
- package/dist/components/icons/naver.d.ts +8 -0
- package/dist/components/icons/naver.js +10 -0
- package/dist/components/icons/notion.d.ts +8 -0
- package/dist/components/icons/notion.js +10 -0
- package/dist/components/icons/paybin.d.ts +7 -0
- package/dist/components/icons/paybin.js +9 -0
- package/dist/components/icons/paypal.d.ts +8 -0
- package/dist/components/icons/paypal.js +10 -0
- package/dist/components/icons/polar.d.ts +8 -0
- package/dist/components/icons/polar.js +10 -0
- package/dist/components/icons/railway.d.ts +8 -0
- package/dist/components/icons/railway.js +10 -0
- package/dist/components/icons/reddit.d.ts +8 -0
- package/dist/components/icons/reddit.js +10 -0
- package/dist/components/icons/roblox.d.ts +11 -0
- package/dist/components/icons/roblox.js +13 -0
- package/dist/components/icons/salesforce.d.ts +8 -0
- package/dist/components/icons/salesforce.js +10 -0
- package/dist/components/icons/slack.d.ts +8 -0
- package/dist/components/icons/slack.js +10 -0
- package/dist/components/icons/spotify.d.ts +8 -0
- package/dist/components/icons/spotify.js +10 -0
- package/dist/components/icons/tiktok.d.ts +9 -0
- package/dist/components/icons/tiktok.js +11 -0
- package/dist/components/icons/twitch.d.ts +8 -0
- package/dist/components/icons/twitch.js +13 -0
- package/dist/components/icons/vercel.d.ts +8 -0
- package/dist/components/icons/vercel.js +10 -0
- package/dist/components/icons/vk.d.ts +8 -0
- package/dist/components/icons/vk.js +10 -0
- package/dist/components/icons/wechat.d.ts +8 -0
- package/dist/components/icons/wechat.js +10 -0
- package/dist/components/icons/x.d.ts +8 -0
- package/dist/components/icons/x.js +10 -0
- package/dist/components/icons/zoom.d.ts +8 -0
- package/dist/components/icons/zoom.js +12 -0
- package/dist/components/settings/account/theme-preview.d.ts +3 -0
- package/dist/components/settings/account/theme-preview.js +10 -0
- package/dist/core.d.ts +1 -0
- package/dist/core.js +1 -0
- package/dist/hooks/auth/use-auth-mutation.d.ts +18 -0
- package/dist/hooks/auth/use-auth-mutation.js +10 -0
- package/dist/hooks/auth/use-auth-query.d.ts +24 -0
- package/dist/hooks/auth/use-auth-query.js +10 -0
- package/dist/hooks/auth/use-authenticate.d.ts +9 -0
- package/dist/hooks/auth/use-authenticate.js +28 -0
- package/dist/hooks/auth/use-forgot-password.d.ts +20 -0
- package/dist/hooks/auth/use-forgot-password.js +14 -0
- package/dist/hooks/auth/use-request-password-reset.d.ts +26 -0
- package/dist/hooks/auth/use-request-password-reset.js +14 -0
- package/dist/hooks/auth/use-reset-password.d.ts +40 -0
- package/dist/hooks/auth/use-reset-password.js +13 -0
- package/dist/hooks/auth/use-send-verification-email.d.ts +24 -0
- package/dist/hooks/auth/use-send-verification-email.js +13 -0
- package/dist/hooks/auth/use-session.d.ts +9 -0
- package/dist/hooks/auth/use-session.js +18 -0
- package/dist/hooks/auth/use-sign-in-email.d.ts +53 -0
- package/dist/hooks/auth/use-sign-in-email.js +24 -0
- package/dist/hooks/auth/use-sign-in-magic-link.d.ts +32 -0
- package/dist/hooks/auth/use-sign-in-magic-link.js +13 -0
- package/dist/hooks/auth/use-sign-in-social.d.ts +93 -0
- package/dist/hooks/auth/use-sign-in-social.js +13 -0
- package/dist/hooks/auth/use-sign-out.d.ts +19 -0
- package/dist/hooks/auth/use-sign-out.js +24 -0
- package/dist/hooks/auth/use-sign-up-email.d.ts +526 -0
- package/dist/hooks/auth/use-sign-up-email.js +24 -0
- package/dist/hooks/auth/use-user.d.ts +513 -0
- package/dist/hooks/auth/use-user.js +14 -0
- package/dist/hooks/settings/use-account-info.d.ts +17 -0
- package/dist/hooks/settings/use-account-info.js +25 -0
- package/dist/hooks/settings/use-change-email.d.ts +24 -0
- package/dist/hooks/settings/use-change-email.js +23 -0
- package/dist/hooks/settings/use-change-password.d.ts +54 -0
- package/dist/hooks/settings/use-change-password.js +11 -0
- package/dist/hooks/settings/use-delete-user.d.ts +42 -0
- package/dist/hooks/settings/use-delete-user.js +11 -0
- package/dist/hooks/settings/use-link-social.d.ts +46 -0
- package/dist/hooks/settings/use-link-social.js +10 -0
- package/dist/hooks/settings/use-list-accounts.d.ts +20 -0
- package/dist/hooks/settings/use-list-accounts.js +23 -0
- package/dist/hooks/settings/use-list-device-sessions.d.ts +11 -0
- package/dist/hooks/settings/use-list-device-sessions.js +22 -0
- package/dist/hooks/settings/use-list-sessions.d.ts +20 -0
- package/dist/hooks/settings/use-list-sessions.js +22 -0
- package/dist/hooks/settings/use-revoke-multi-session.d.ts +19 -0
- package/dist/hooks/settings/use-revoke-multi-session.js +20 -0
- package/dist/hooks/settings/use-revoke-session.d.ts +19 -0
- package/dist/hooks/settings/use-revoke-session.js +21 -0
- package/dist/hooks/settings/use-set-active-session.d.ts +37 -0
- package/dist/hooks/settings/use-set-active-session.js +28 -0
- package/dist/hooks/settings/use-unlink-account.d.ts +21 -0
- package/dist/hooks/settings/use-unlink-account.js +21 -0
- package/dist/hooks/settings/use-update-user.d.ts +11 -0
- package/dist/hooks/settings/use-update-user.js +29 -0
- package/dist/hooks/use-hydrated.d.ts +6 -0
- package/dist/hooks/use-hydrated.js +18 -0
- package/dist/index.d.ts +32 -0
- package/dist/index.js +33 -0
- package/dist/lib/auth-client.d.ts +1979 -0
- package/dist/lib/auth-client.js +5 -0
- package/dist/lib/auth-config.d.ts +43 -0
- package/dist/lib/auth-config.js +1 -0
- package/dist/lib/auth-context.d.ts +2 -0
- package/dist/lib/auth-context.js +3 -0
- package/dist/lib/auth-hook-options.d.ts +8 -0
- package/dist/lib/auth-hook-options.js +1 -0
- package/dist/lib/provider-icons.d.ts +13 -0
- package/dist/lib/provider-icons.js +48 -0
- package/dist/lib/utils.d.ts +2 -0
- package/dist/lib/utils.js +5 -0
- package/package.json +64 -0
- package/src/components/auth/auth-provider.tsx +82 -0
- package/src/components/email/email-changed.tsx +381 -0
- package/src/components/email/email-localization.tsx +33 -0
- package/src/components/email/email-styles.tsx +175 -0
- package/src/components/email/email-verification.tsx +350 -0
- package/src/components/email/index.ts +9 -0
- package/src/components/email/magic-link.tsx +349 -0
- package/src/components/email/new-device.tsx +452 -0
- package/src/components/email/otp-email.tsx +321 -0
- package/src/components/email/password-changed.tsx +380 -0
- package/src/components/email/reset-password.tsx +343 -0
- package/src/components/icons/apple.tsx +24 -0
- package/src/components/icons/atlassian.tsx +43 -0
- package/src/components/icons/cognito.tsx +25 -0
- package/src/components/icons/discord.tsx +24 -0
- package/src/components/icons/dropbox.tsx +24 -0
- package/src/components/icons/facebook.tsx +30 -0
- package/src/components/icons/figma.tsx +43 -0
- package/src/components/icons/github.tsx +26 -0
- package/src/components/icons/gitlab.tsx +36 -0
- package/src/components/icons/google.tsx +42 -0
- package/src/components/icons/huggingface.tsx +44 -0
- package/src/components/icons/index.ts +35 -0
- package/src/components/icons/kakao.tsx +26 -0
- package/src/components/icons/kick.tsx +30 -0
- package/src/components/icons/line.tsx +24 -0
- package/src/components/icons/linear.tsx +24 -0
- package/src/components/icons/linkedin.tsx +28 -0
- package/src/components/icons/microsoft.tsx +24 -0
- package/src/components/icons/naver.tsx +24 -0
- package/src/components/icons/notion.tsx +25 -0
- package/src/components/icons/paybin.tsx +37 -0
- package/src/components/icons/paypal.tsx +36 -0
- package/src/components/icons/polar.tsx +31 -0
- package/src/components/icons/railway.tsx +24 -0
- package/src/components/icons/reddit.tsx +25 -0
- package/src/components/icons/roblox.tsx +28 -0
- package/src/components/icons/salesforce.tsx +24 -0
- package/src/components/icons/slack.tsx +36 -0
- package/src/components/icons/spotify.tsx +24 -0
- package/src/components/icons/tiktok.tsx +32 -0
- package/src/components/icons/twitch.tsx +50 -0
- package/src/components/icons/vercel.tsx +21 -0
- package/src/components/icons/vk.tsx +24 -0
- package/src/components/icons/wechat.tsx +24 -0
- package/src/components/icons/x.tsx +24 -0
- package/src/components/icons/zoom.tsx +48 -0
- package/src/components/settings/account/theme-preview.tsx +271 -0
- package/src/core.ts +1 -0
- package/src/hooks/auth/use-auth-mutation.ts +56 -0
- package/src/hooks/auth/use-auth-query.ts +50 -0
- package/src/hooks/auth/use-authenticate.ts +35 -0
- package/src/hooks/auth/use-request-password-reset.ts +24 -0
- package/src/hooks/auth/use-reset-password.ts +23 -0
- package/src/hooks/auth/use-send-verification-email.ts +23 -0
- package/src/hooks/auth/use-session.ts +26 -0
- package/src/hooks/auth/use-sign-in-email.ts +35 -0
- package/src/hooks/auth/use-sign-in-magic-link.ts +23 -0
- package/src/hooks/auth/use-sign-in-social.ts +23 -0
- package/src/hooks/auth/use-sign-out.ts +34 -0
- package/src/hooks/auth/use-sign-up-email.ts +35 -0
- package/src/hooks/auth/use-user.ts +21 -0
- package/src/hooks/settings/use-account-info.ts +30 -0
- package/src/hooks/settings/use-change-email.ts +33 -0
- package/src/hooks/settings/use-change-password.ts +21 -0
- package/src/hooks/settings/use-delete-user.ts +21 -0
- package/src/hooks/settings/use-link-social.ts +19 -0
- package/src/hooks/settings/use-list-accounts.ts +27 -0
- package/src/hooks/settings/use-list-device-sessions.ts +32 -0
- package/src/hooks/settings/use-list-sessions.ts +26 -0
- package/src/hooks/settings/use-revoke-multi-session.ts +30 -0
- package/src/hooks/settings/use-revoke-session.ts +31 -0
- package/src/hooks/settings/use-set-active-session.ts +46 -0
- package/src/hooks/settings/use-unlink-account.ts +31 -0
- package/src/hooks/settings/use-update-user.ts +44 -0
- package/src/index.ts +34 -0
- package/src/lib/auth-client.ts +37 -0
- package/src/lib/auth-config.ts +48 -0
- package/src/lib/auth-context.ts +6 -0
- package/src/lib/provider-icons.ts +90 -0
- package/src/lib/utils.ts +6 -0
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
import { type AuthClient } from "@better-auth-ui/react";
|
|
2
|
+
import type { UseAuthMutationOptions } from "./use-auth-mutation";
|
|
3
|
+
export { useAuthMutation } from "./use-auth-mutation";
|
|
4
|
+
/**
|
|
5
|
+
* Hook that creates a mutation for social sign-in.
|
|
6
|
+
*
|
|
7
|
+
* The mutation initiates a social sign-in flow with the specified provider.
|
|
8
|
+
*
|
|
9
|
+
* @returns The `useMutation` result.
|
|
10
|
+
*/
|
|
11
|
+
export declare function useSignInSocial(options?: UseAuthMutationOptions<AuthClient["signIn"]["social"]>): import("./use-auth-mutation").UseAuthMutationResult<(<FetchOptions extends import("better-auth").ClientFetchOption<Partial<{
|
|
12
|
+
provider: "github" | "apple" | "atlassian" | "cognito" | "discord" | "facebook" | "figma" | "microsoft" | "google" | "huggingface" | "slack" | "spotify" | "twitch" | "twitter" | "dropbox" | "kick" | "linear" | "linkedin" | "gitlab" | "tiktok" | "reddit" | "roblox" | "salesforce" | "vk" | "zoom" | "notion" | "kakao" | "naver" | "line" | "paybin" | "paypal" | "polar" | "railway" | "vercel" | "wechat" | (string & {});
|
|
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
|
+
}> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: import("better-auth").Prettify<{
|
|
36
|
+
provider: "github" | "apple" | "atlassian" | "cognito" | "discord" | "facebook" | "figma" | "microsoft" | "google" | "huggingface" | "slack" | "spotify" | "twitch" | "twitter" | "dropbox" | "kick" | "linear" | "linkedin" | "gitlab" | "tiktok" | "reddit" | "roblox" | "salesforce" | "vk" | "zoom" | "notion" | "kakao" | "naver" | "line" | "paybin" | "paypal" | "polar" | "railway" | "vercel" | "wechat" | (string & {});
|
|
37
|
+
callbackURL?: string | undefined;
|
|
38
|
+
newUserCallbackURL?: string | undefined;
|
|
39
|
+
errorCallbackURL?: string | undefined;
|
|
40
|
+
disableRedirect?: boolean | undefined;
|
|
41
|
+
idToken?: {
|
|
42
|
+
token: string;
|
|
43
|
+
nonce?: string | undefined;
|
|
44
|
+
accessToken?: string | undefined;
|
|
45
|
+
refreshToken?: string | undefined;
|
|
46
|
+
expiresAt?: number | undefined;
|
|
47
|
+
user?: {
|
|
48
|
+
name?: {
|
|
49
|
+
firstName?: string | undefined;
|
|
50
|
+
lastName?: string | undefined;
|
|
51
|
+
} | undefined;
|
|
52
|
+
email?: string | undefined;
|
|
53
|
+
} | undefined;
|
|
54
|
+
} | undefined;
|
|
55
|
+
scopes?: string[] | undefined;
|
|
56
|
+
requestSignUp?: boolean | undefined;
|
|
57
|
+
loginHint?: string | undefined;
|
|
58
|
+
additionalData?: Record<string, any> | undefined;
|
|
59
|
+
} & {
|
|
60
|
+
fetchOptions?: FetchOptions | undefined;
|
|
61
|
+
}>, data_1?: FetchOptions | undefined) => Promise<import("better-auth/react").BetterFetchResponse<{
|
|
62
|
+
redirect: boolean;
|
|
63
|
+
url: string;
|
|
64
|
+
} | (Omit<{
|
|
65
|
+
redirect: boolean;
|
|
66
|
+
token: string;
|
|
67
|
+
url: undefined;
|
|
68
|
+
user: {
|
|
69
|
+
id: string;
|
|
70
|
+
createdAt: Date;
|
|
71
|
+
updatedAt: Date;
|
|
72
|
+
email: string;
|
|
73
|
+
emailVerified: boolean;
|
|
74
|
+
name: string;
|
|
75
|
+
image?: string | null | undefined | undefined;
|
|
76
|
+
};
|
|
77
|
+
}, "user"> & {
|
|
78
|
+
user: import("better-auth").StripEmptyObjects<{
|
|
79
|
+
id: string;
|
|
80
|
+
createdAt: Date;
|
|
81
|
+
updatedAt: Date;
|
|
82
|
+
email: string;
|
|
83
|
+
emailVerified: boolean;
|
|
84
|
+
name: string;
|
|
85
|
+
image?: string | null | undefined;
|
|
86
|
+
} & {} & {
|
|
87
|
+
username?: string | null | undefined;
|
|
88
|
+
displayUsername?: string | null | undefined;
|
|
89
|
+
}>;
|
|
90
|
+
}), {
|
|
91
|
+
code?: string | undefined;
|
|
92
|
+
message?: string | undefined;
|
|
93
|
+
}, FetchOptions["throw"] extends true ? true : false>>)>;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { useAuth, useAuthMutation } from "@better-auth-ui/react";
|
|
2
|
+
export { useAuthMutation } from "./use-auth-mutation";
|
|
3
|
+
/**
|
|
4
|
+
* Hook that creates a mutation for social sign-in.
|
|
5
|
+
*
|
|
6
|
+
* The mutation initiates a social sign-in flow with the specified provider.
|
|
7
|
+
*
|
|
8
|
+
* @returns The `useMutation` result.
|
|
9
|
+
*/
|
|
10
|
+
export function useSignInSocial(options) {
|
|
11
|
+
const { authClient } = useAuth();
|
|
12
|
+
return useAuthMutation({ authFn: authClient.signIn.social, options });
|
|
13
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { type AuthClient } from "@better-auth-ui/react";
|
|
2
|
+
import type { UseAuthMutationOptions } from "./use-auth-mutation";
|
|
3
|
+
export { useAuthMutation } from "./use-auth-mutation";
|
|
4
|
+
/**
|
|
5
|
+
* Hook that creates a mutation for signing out.
|
|
6
|
+
*
|
|
7
|
+
* The mutation signs out the current user and removes auth queries from cache.
|
|
8
|
+
*
|
|
9
|
+
* @returns The `useMutation` result.
|
|
10
|
+
*/
|
|
11
|
+
export declare function useSignOut(options?: UseAuthMutationOptions<AuthClient["signOut"]>): import("./use-auth-mutation").UseAuthMutationResult<(<FetchOptions extends import("better-auth").ClientFetchOption<never, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0?: import("better-auth").Prettify<{
|
|
12
|
+
query?: Record<string, any> | undefined;
|
|
13
|
+
fetchOptions?: FetchOptions | undefined;
|
|
14
|
+
}> | undefined, data_1?: FetchOptions | undefined) => Promise<import("better-auth/react").BetterFetchResponse<{
|
|
15
|
+
success: boolean;
|
|
16
|
+
}, {
|
|
17
|
+
code?: string | undefined;
|
|
18
|
+
message?: string | undefined;
|
|
19
|
+
}, FetchOptions["throw"] extends true ? true : false>>)>;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { useAuth, useAuthMutation } from "@better-auth-ui/react";
|
|
2
|
+
import { useQueryClient } from "@tanstack/react-query";
|
|
3
|
+
export { useAuthMutation } from "./use-auth-mutation";
|
|
4
|
+
/**
|
|
5
|
+
* Hook that creates a mutation for signing out.
|
|
6
|
+
*
|
|
7
|
+
* The mutation signs out the current user and removes auth queries from cache.
|
|
8
|
+
*
|
|
9
|
+
* @returns The `useMutation` result.
|
|
10
|
+
*/
|
|
11
|
+
export function useSignOut(options) {
|
|
12
|
+
const { authClient } = useAuth();
|
|
13
|
+
const queryClient = useQueryClient();
|
|
14
|
+
return useAuthMutation({
|
|
15
|
+
authFn: authClient.signOut,
|
|
16
|
+
options: {
|
|
17
|
+
...options,
|
|
18
|
+
onSuccess: async (...args) => {
|
|
19
|
+
queryClient.removeQueries({ queryKey: ["auth"] });
|
|
20
|
+
await options?.onSuccess?.(...args);
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
});
|
|
24
|
+
}
|
|
@@ -0,0 +1,526 @@
|
|
|
1
|
+
import { type AuthClient } from "@better-auth-ui/react";
|
|
2
|
+
import type { UseAuthMutationOptions } from "./use-auth-mutation";
|
|
3
|
+
export { useAuthMutation } from "./use-auth-mutation";
|
|
4
|
+
/**
|
|
5
|
+
* Hook that creates a mutation for email/password sign-up.
|
|
6
|
+
*
|
|
7
|
+
* The mutation sends an email/password sign-up request and
|
|
8
|
+
* refetches the session on success.
|
|
9
|
+
*
|
|
10
|
+
* @returns The `useMutation` result.
|
|
11
|
+
*/
|
|
12
|
+
export declare function useSignUpEmail(options?: UseAuthMutationOptions<AuthClient["signUp"]["email"]>): import("./use-auth-mutation").UseAuthMutationResult<(<FetchOptions extends import("better-auth").ClientFetchOption<Partial<{
|
|
13
|
+
name: string;
|
|
14
|
+
email: string;
|
|
15
|
+
password: string;
|
|
16
|
+
image?: string | undefined;
|
|
17
|
+
callbackURL?: string | undefined;
|
|
18
|
+
rememberMe?: boolean | undefined;
|
|
19
|
+
}> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: import("better-auth").Prettify<import("better-auth/client").InferSignUpEmailCtx<{
|
|
20
|
+
plugins: ({
|
|
21
|
+
id: "magic-link";
|
|
22
|
+
version: string;
|
|
23
|
+
$InferServerPlugin: ReturnType<(options: import("better-auth/plugins/magic-link").MagicLinkOptions) => {
|
|
24
|
+
id: "magic-link";
|
|
25
|
+
version: string;
|
|
26
|
+
endpoints: {
|
|
27
|
+
signInMagicLink: import("better-auth").StrictEndpoint<"/sign-in/magic-link", {
|
|
28
|
+
method: "POST";
|
|
29
|
+
requireHeaders: true;
|
|
30
|
+
body: import("zod").ZodObject<{
|
|
31
|
+
email: import("zod").ZodEmail;
|
|
32
|
+
name: import("zod").ZodOptional<import("zod").ZodString>;
|
|
33
|
+
callbackURL: import("zod").ZodOptional<import("zod").ZodString>;
|
|
34
|
+
newUserCallbackURL: import("zod").ZodOptional<import("zod").ZodString>;
|
|
35
|
+
errorCallbackURL: import("zod").ZodOptional<import("zod").ZodString>;
|
|
36
|
+
metadata: import("zod").ZodOptional<import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodAny>>;
|
|
37
|
+
}, import("zod/v4/core").$strip>;
|
|
38
|
+
metadata: {
|
|
39
|
+
openapi: {
|
|
40
|
+
operationId: string;
|
|
41
|
+
description: string;
|
|
42
|
+
responses: {
|
|
43
|
+
200: {
|
|
44
|
+
description: string;
|
|
45
|
+
content: {
|
|
46
|
+
"application/json": {
|
|
47
|
+
schema: {
|
|
48
|
+
type: "object";
|
|
49
|
+
properties: {
|
|
50
|
+
status: {
|
|
51
|
+
type: string;
|
|
52
|
+
};
|
|
53
|
+
};
|
|
54
|
+
};
|
|
55
|
+
};
|
|
56
|
+
};
|
|
57
|
+
};
|
|
58
|
+
};
|
|
59
|
+
};
|
|
60
|
+
};
|
|
61
|
+
}, {
|
|
62
|
+
status: boolean;
|
|
63
|
+
}>;
|
|
64
|
+
magicLinkVerify: import("better-auth").StrictEndpoint<"/magic-link/verify", {
|
|
65
|
+
method: "GET";
|
|
66
|
+
query: import("zod").ZodObject<{
|
|
67
|
+
token: import("zod").ZodString;
|
|
68
|
+
callbackURL: import("zod").ZodOptional<import("zod").ZodString>;
|
|
69
|
+
errorCallbackURL: import("zod").ZodOptional<import("zod").ZodString>;
|
|
70
|
+
newUserCallbackURL: import("zod").ZodOptional<import("zod").ZodString>;
|
|
71
|
+
}, import("zod/v4/core").$strip>;
|
|
72
|
+
use: ((inputContext: import("better-auth").MiddlewareInputContext<import("better-auth").MiddlewareOptions>) => Promise<void>)[];
|
|
73
|
+
requireHeaders: true;
|
|
74
|
+
metadata: {
|
|
75
|
+
openapi: {
|
|
76
|
+
operationId: string;
|
|
77
|
+
description: string;
|
|
78
|
+
responses: {
|
|
79
|
+
200: {
|
|
80
|
+
description: string;
|
|
81
|
+
content: {
|
|
82
|
+
"application/json": {
|
|
83
|
+
schema: {
|
|
84
|
+
type: "object";
|
|
85
|
+
properties: {
|
|
86
|
+
session: {
|
|
87
|
+
$ref: string;
|
|
88
|
+
};
|
|
89
|
+
user: {
|
|
90
|
+
$ref: string;
|
|
91
|
+
};
|
|
92
|
+
};
|
|
93
|
+
};
|
|
94
|
+
};
|
|
95
|
+
};
|
|
96
|
+
};
|
|
97
|
+
};
|
|
98
|
+
};
|
|
99
|
+
};
|
|
100
|
+
}, {
|
|
101
|
+
token: string;
|
|
102
|
+
user: {
|
|
103
|
+
id: string;
|
|
104
|
+
createdAt: Date;
|
|
105
|
+
updatedAt: Date;
|
|
106
|
+
email: string;
|
|
107
|
+
emailVerified: boolean;
|
|
108
|
+
name: string;
|
|
109
|
+
image?: string | null | undefined;
|
|
110
|
+
};
|
|
111
|
+
session: {
|
|
112
|
+
id: string;
|
|
113
|
+
createdAt: Date;
|
|
114
|
+
updatedAt: Date;
|
|
115
|
+
userId: string;
|
|
116
|
+
expiresAt: Date;
|
|
117
|
+
token: string;
|
|
118
|
+
ipAddress?: string | null | undefined;
|
|
119
|
+
userAgent?: string | null | undefined;
|
|
120
|
+
};
|
|
121
|
+
}>;
|
|
122
|
+
};
|
|
123
|
+
rateLimit: {
|
|
124
|
+
pathMatcher(path: string): boolean;
|
|
125
|
+
window: number;
|
|
126
|
+
max: number;
|
|
127
|
+
}[];
|
|
128
|
+
options: import("better-auth/plugins/magic-link").MagicLinkOptions;
|
|
129
|
+
}>;
|
|
130
|
+
} | {
|
|
131
|
+
id: "multi-session";
|
|
132
|
+
version: string;
|
|
133
|
+
$InferServerPlugin: ReturnType<(options?: import("better-auth/plugins/multi-session").MultiSessionConfig | undefined) => {
|
|
134
|
+
id: "multi-session";
|
|
135
|
+
version: string;
|
|
136
|
+
endpoints: {
|
|
137
|
+
listDeviceSessions: import("better-auth").StrictEndpoint<"/multi-session/list-device-sessions", {
|
|
138
|
+
method: "GET";
|
|
139
|
+
requireHeaders: true;
|
|
140
|
+
}, {
|
|
141
|
+
session: {
|
|
142
|
+
id: string;
|
|
143
|
+
createdAt: Date;
|
|
144
|
+
updatedAt: Date;
|
|
145
|
+
userId: string;
|
|
146
|
+
expiresAt: Date;
|
|
147
|
+
token: string;
|
|
148
|
+
ipAddress?: string | null | undefined;
|
|
149
|
+
userAgent?: string | null | undefined;
|
|
150
|
+
};
|
|
151
|
+
user: {
|
|
152
|
+
id: string;
|
|
153
|
+
createdAt: Date;
|
|
154
|
+
updatedAt: Date;
|
|
155
|
+
email: string;
|
|
156
|
+
emailVerified: boolean;
|
|
157
|
+
name: string;
|
|
158
|
+
image?: string | null | undefined;
|
|
159
|
+
};
|
|
160
|
+
}[]>;
|
|
161
|
+
setActiveSession: import("better-auth").StrictEndpoint<"/multi-session/set-active", {
|
|
162
|
+
method: "POST";
|
|
163
|
+
body: import("zod").ZodObject<{
|
|
164
|
+
sessionToken: import("zod").ZodString;
|
|
165
|
+
}, import("zod/v4/core").$strip>;
|
|
166
|
+
requireHeaders: true;
|
|
167
|
+
metadata: {
|
|
168
|
+
openapi: {
|
|
169
|
+
description: string;
|
|
170
|
+
responses: {
|
|
171
|
+
200: {
|
|
172
|
+
description: string;
|
|
173
|
+
content: {
|
|
174
|
+
"application/json": {
|
|
175
|
+
schema: {
|
|
176
|
+
type: "object";
|
|
177
|
+
properties: {
|
|
178
|
+
session: {
|
|
179
|
+
$ref: string;
|
|
180
|
+
};
|
|
181
|
+
};
|
|
182
|
+
};
|
|
183
|
+
};
|
|
184
|
+
};
|
|
185
|
+
};
|
|
186
|
+
};
|
|
187
|
+
};
|
|
188
|
+
};
|
|
189
|
+
}, {
|
|
190
|
+
session: {
|
|
191
|
+
id: string;
|
|
192
|
+
createdAt: Date;
|
|
193
|
+
updatedAt: Date;
|
|
194
|
+
userId: string;
|
|
195
|
+
expiresAt: Date;
|
|
196
|
+
token: string;
|
|
197
|
+
ipAddress?: string | null | undefined;
|
|
198
|
+
userAgent?: string | null | undefined;
|
|
199
|
+
} & Record<string, any>;
|
|
200
|
+
user: {
|
|
201
|
+
id: string;
|
|
202
|
+
createdAt: Date;
|
|
203
|
+
updatedAt: Date;
|
|
204
|
+
email: string;
|
|
205
|
+
emailVerified: boolean;
|
|
206
|
+
name: string;
|
|
207
|
+
image?: string | null | undefined;
|
|
208
|
+
} & Record<string, any>;
|
|
209
|
+
}>;
|
|
210
|
+
revokeDeviceSession: import("better-auth").StrictEndpoint<"/multi-session/revoke", {
|
|
211
|
+
method: "POST";
|
|
212
|
+
body: import("zod").ZodObject<{
|
|
213
|
+
sessionToken: import("zod").ZodString;
|
|
214
|
+
}, import("zod/v4/core").$strip>;
|
|
215
|
+
requireHeaders: true;
|
|
216
|
+
use: ((inputContext: import("better-auth").MiddlewareInputContext<import("better-auth").MiddlewareOptions>) => Promise<{
|
|
217
|
+
session: {
|
|
218
|
+
session: Record<string, any> & {
|
|
219
|
+
id: string;
|
|
220
|
+
createdAt: Date;
|
|
221
|
+
updatedAt: Date;
|
|
222
|
+
userId: string;
|
|
223
|
+
expiresAt: Date;
|
|
224
|
+
token: string;
|
|
225
|
+
ipAddress?: string | null | undefined;
|
|
226
|
+
userAgent?: string | null | undefined;
|
|
227
|
+
};
|
|
228
|
+
user: Record<string, any> & {
|
|
229
|
+
id: string;
|
|
230
|
+
createdAt: Date;
|
|
231
|
+
updatedAt: Date;
|
|
232
|
+
email: string;
|
|
233
|
+
emailVerified: boolean;
|
|
234
|
+
name: string;
|
|
235
|
+
image?: string | null | undefined;
|
|
236
|
+
};
|
|
237
|
+
};
|
|
238
|
+
}>)[];
|
|
239
|
+
metadata: {
|
|
240
|
+
openapi: {
|
|
241
|
+
description: string;
|
|
242
|
+
responses: {
|
|
243
|
+
200: {
|
|
244
|
+
description: string;
|
|
245
|
+
content: {
|
|
246
|
+
"application/json": {
|
|
247
|
+
schema: {
|
|
248
|
+
type: "object";
|
|
249
|
+
properties: {
|
|
250
|
+
status: {
|
|
251
|
+
type: string;
|
|
252
|
+
};
|
|
253
|
+
};
|
|
254
|
+
};
|
|
255
|
+
};
|
|
256
|
+
};
|
|
257
|
+
};
|
|
258
|
+
};
|
|
259
|
+
};
|
|
260
|
+
};
|
|
261
|
+
}, {
|
|
262
|
+
status: boolean;
|
|
263
|
+
}>;
|
|
264
|
+
};
|
|
265
|
+
hooks: {
|
|
266
|
+
after: {
|
|
267
|
+
matcher: (context: import("better-auth").HookEndpointContext) => boolean;
|
|
268
|
+
handler: (inputContext: import("better-auth").MiddlewareInputContext<import("better-auth").MiddlewareOptions>) => Promise<void>;
|
|
269
|
+
}[];
|
|
270
|
+
};
|
|
271
|
+
options: import("better-auth/plugins/multi-session").MultiSessionConfig | undefined;
|
|
272
|
+
$ERROR_CODES: {
|
|
273
|
+
INVALID_SESSION_TOKEN: import("better-auth").RawError<"INVALID_SESSION_TOKEN">;
|
|
274
|
+
};
|
|
275
|
+
}>;
|
|
276
|
+
atomListeners: {
|
|
277
|
+
matcher(path: string): path is "/multi-session/set-active";
|
|
278
|
+
signal: "$sessionSignal";
|
|
279
|
+
}[];
|
|
280
|
+
$ERROR_CODES: {
|
|
281
|
+
INVALID_SESSION_TOKEN: import("better-auth").RawError<"INVALID_SESSION_TOKEN">;
|
|
282
|
+
};
|
|
283
|
+
} | {
|
|
284
|
+
id: "username";
|
|
285
|
+
version: string;
|
|
286
|
+
$InferServerPlugin: ReturnType<(options?: import("better-auth/plugins/username").UsernameOptions | undefined) => {
|
|
287
|
+
id: "username";
|
|
288
|
+
version: string;
|
|
289
|
+
init(ctx: import("better-auth").AuthContext): {
|
|
290
|
+
options: {
|
|
291
|
+
databaseHooks: {
|
|
292
|
+
user: {
|
|
293
|
+
create: {
|
|
294
|
+
before(user: {
|
|
295
|
+
id: string;
|
|
296
|
+
createdAt: Date;
|
|
297
|
+
updatedAt: Date;
|
|
298
|
+
email: string;
|
|
299
|
+
emailVerified: boolean;
|
|
300
|
+
name: string;
|
|
301
|
+
image?: string | null | undefined;
|
|
302
|
+
} & Record<string, unknown>, context: import("better-auth").GenericEndpointContext | null): Promise<{
|
|
303
|
+
data: {
|
|
304
|
+
displayUsername?: string | undefined;
|
|
305
|
+
username?: string | undefined;
|
|
306
|
+
id: string;
|
|
307
|
+
createdAt: Date;
|
|
308
|
+
updatedAt: Date;
|
|
309
|
+
email: string;
|
|
310
|
+
emailVerified: boolean;
|
|
311
|
+
name: string;
|
|
312
|
+
image?: string | null | undefined;
|
|
313
|
+
};
|
|
314
|
+
}>;
|
|
315
|
+
};
|
|
316
|
+
update: {
|
|
317
|
+
before(user: Partial<{
|
|
318
|
+
id: string;
|
|
319
|
+
createdAt: Date;
|
|
320
|
+
updatedAt: Date;
|
|
321
|
+
email: string;
|
|
322
|
+
emailVerified: boolean;
|
|
323
|
+
name: string;
|
|
324
|
+
image?: string | null | undefined;
|
|
325
|
+
}> & Record<string, unknown>, context: import("better-auth").GenericEndpointContext | null): Promise<{
|
|
326
|
+
data: {
|
|
327
|
+
displayUsername?: string | undefined;
|
|
328
|
+
username?: string | undefined;
|
|
329
|
+
id?: string | undefined;
|
|
330
|
+
createdAt?: Date | undefined;
|
|
331
|
+
updatedAt?: Date | undefined;
|
|
332
|
+
email?: string | undefined;
|
|
333
|
+
emailVerified?: boolean | undefined;
|
|
334
|
+
name?: string | undefined;
|
|
335
|
+
image?: string | null | undefined;
|
|
336
|
+
};
|
|
337
|
+
}>;
|
|
338
|
+
};
|
|
339
|
+
};
|
|
340
|
+
};
|
|
341
|
+
};
|
|
342
|
+
};
|
|
343
|
+
endpoints: {
|
|
344
|
+
signInUsername: import("better-auth").StrictEndpoint<"/sign-in/username", {
|
|
345
|
+
method: "POST";
|
|
346
|
+
body: import("zod").ZodObject<{
|
|
347
|
+
username: import("zod").ZodString;
|
|
348
|
+
password: import("zod").ZodString;
|
|
349
|
+
rememberMe: import("zod").ZodOptional<import("zod").ZodBoolean>;
|
|
350
|
+
callbackURL: import("zod").ZodOptional<import("zod").ZodString>;
|
|
351
|
+
}, import("zod/v4/core").$strip>;
|
|
352
|
+
metadata: {
|
|
353
|
+
openapi: {
|
|
354
|
+
summary: string;
|
|
355
|
+
description: string;
|
|
356
|
+
responses: {
|
|
357
|
+
200: {
|
|
358
|
+
description: string;
|
|
359
|
+
content: {
|
|
360
|
+
"application/json": {
|
|
361
|
+
schema: {
|
|
362
|
+
type: "object";
|
|
363
|
+
properties: {
|
|
364
|
+
token: {
|
|
365
|
+
type: string;
|
|
366
|
+
description: string;
|
|
367
|
+
};
|
|
368
|
+
user: {
|
|
369
|
+
$ref: string;
|
|
370
|
+
};
|
|
371
|
+
};
|
|
372
|
+
required: string[];
|
|
373
|
+
};
|
|
374
|
+
};
|
|
375
|
+
};
|
|
376
|
+
};
|
|
377
|
+
422: {
|
|
378
|
+
description: string;
|
|
379
|
+
content: {
|
|
380
|
+
"application/json": {
|
|
381
|
+
schema: {
|
|
382
|
+
type: "object";
|
|
383
|
+
properties: {
|
|
384
|
+
message: {
|
|
385
|
+
type: string;
|
|
386
|
+
};
|
|
387
|
+
};
|
|
388
|
+
};
|
|
389
|
+
};
|
|
390
|
+
};
|
|
391
|
+
};
|
|
392
|
+
};
|
|
393
|
+
};
|
|
394
|
+
};
|
|
395
|
+
}, {
|
|
396
|
+
token: string;
|
|
397
|
+
user: {
|
|
398
|
+
id: string;
|
|
399
|
+
createdAt: Date;
|
|
400
|
+
updatedAt: Date;
|
|
401
|
+
email: string;
|
|
402
|
+
emailVerified: boolean;
|
|
403
|
+
name: string;
|
|
404
|
+
image?: string | null | undefined;
|
|
405
|
+
} & {
|
|
406
|
+
username: string;
|
|
407
|
+
displayUsername: string;
|
|
408
|
+
};
|
|
409
|
+
}>;
|
|
410
|
+
isUsernameAvailable: import("better-auth").StrictEndpoint<"/is-username-available", {
|
|
411
|
+
method: "POST";
|
|
412
|
+
body: import("zod").ZodObject<{
|
|
413
|
+
username: import("zod").ZodString;
|
|
414
|
+
}, import("zod/v4/core").$strip>;
|
|
415
|
+
}, {
|
|
416
|
+
available: boolean;
|
|
417
|
+
}>;
|
|
418
|
+
};
|
|
419
|
+
schema: {
|
|
420
|
+
user: {
|
|
421
|
+
fields: {
|
|
422
|
+
username: {
|
|
423
|
+
type: "string";
|
|
424
|
+
required: false;
|
|
425
|
+
sortable: true;
|
|
426
|
+
unique: true;
|
|
427
|
+
returned: true;
|
|
428
|
+
transform: {
|
|
429
|
+
input(value: import("better-auth").DBPrimitive): string | number | boolean | Date | Record<string, unknown> | unknown[] | null | undefined;
|
|
430
|
+
};
|
|
431
|
+
};
|
|
432
|
+
displayUsername: {
|
|
433
|
+
type: "string";
|
|
434
|
+
required: false;
|
|
435
|
+
transform: {
|
|
436
|
+
input(value: import("better-auth").DBPrimitive): string | number | boolean | Date | Record<string, unknown> | unknown[] | null | undefined;
|
|
437
|
+
};
|
|
438
|
+
};
|
|
439
|
+
};
|
|
440
|
+
};
|
|
441
|
+
};
|
|
442
|
+
hooks: {
|
|
443
|
+
before: {
|
|
444
|
+
matcher(context: import("better-auth").HookEndpointContext): boolean;
|
|
445
|
+
handler: (inputContext: import("better-auth").MiddlewareInputContext<import("better-auth").MiddlewareOptions>) => Promise<void>;
|
|
446
|
+
}[];
|
|
447
|
+
};
|
|
448
|
+
options: import("better-auth/plugins/username").UsernameOptions | undefined;
|
|
449
|
+
$ERROR_CODES: {
|
|
450
|
+
EMAIL_NOT_VERIFIED: import("better-auth").RawError<"EMAIL_NOT_VERIFIED">;
|
|
451
|
+
UNEXPECTED_ERROR: import("better-auth").RawError<"UNEXPECTED_ERROR">;
|
|
452
|
+
INVALID_USERNAME_OR_PASSWORD: import("better-auth").RawError<"INVALID_USERNAME_OR_PASSWORD">;
|
|
453
|
+
USERNAME_IS_ALREADY_TAKEN: import("better-auth").RawError<"USERNAME_IS_ALREADY_TAKEN">;
|
|
454
|
+
USERNAME_TOO_SHORT: import("better-auth").RawError<"USERNAME_TOO_SHORT">;
|
|
455
|
+
USERNAME_TOO_LONG: import("better-auth").RawError<"USERNAME_TOO_LONG">;
|
|
456
|
+
INVALID_USERNAME: import("better-auth").RawError<"INVALID_USERNAME">;
|
|
457
|
+
INVALID_DISPLAY_USERNAME: import("better-auth").RawError<"INVALID_DISPLAY_USERNAME">;
|
|
458
|
+
};
|
|
459
|
+
}>;
|
|
460
|
+
atomListeners: {
|
|
461
|
+
matcher: (path: string) => path is "/sign-in/username";
|
|
462
|
+
signal: "$sessionSignal";
|
|
463
|
+
}[];
|
|
464
|
+
$ERROR_CODES: {
|
|
465
|
+
EMAIL_NOT_VERIFIED: import("better-auth").RawError<"EMAIL_NOT_VERIFIED">;
|
|
466
|
+
UNEXPECTED_ERROR: import("better-auth").RawError<"UNEXPECTED_ERROR">;
|
|
467
|
+
INVALID_USERNAME_OR_PASSWORD: import("better-auth").RawError<"INVALID_USERNAME_OR_PASSWORD">;
|
|
468
|
+
USERNAME_IS_ALREADY_TAKEN: import("better-auth").RawError<"USERNAME_IS_ALREADY_TAKEN">;
|
|
469
|
+
USERNAME_TOO_SHORT: import("better-auth").RawError<"USERNAME_TOO_SHORT">;
|
|
470
|
+
USERNAME_TOO_LONG: import("better-auth").RawError<"USERNAME_TOO_LONG">;
|
|
471
|
+
INVALID_USERNAME: import("better-auth").RawError<"INVALID_USERNAME">;
|
|
472
|
+
INVALID_DISPLAY_USERNAME: import("better-auth").RawError<"INVALID_DISPLAY_USERNAME">;
|
|
473
|
+
};
|
|
474
|
+
})[];
|
|
475
|
+
}, FetchOptions>>, data_1?: FetchOptions | undefined) => Promise<import("better-auth/react").BetterFetchResponse<(Omit<{
|
|
476
|
+
token: null;
|
|
477
|
+
user: {
|
|
478
|
+
id: string;
|
|
479
|
+
createdAt: Date;
|
|
480
|
+
updatedAt: Date;
|
|
481
|
+
email: string;
|
|
482
|
+
emailVerified: boolean;
|
|
483
|
+
name: string;
|
|
484
|
+
image?: string | null | undefined | undefined;
|
|
485
|
+
};
|
|
486
|
+
}, "user"> & {
|
|
487
|
+
user: import("better-auth").StripEmptyObjects<{
|
|
488
|
+
id: string;
|
|
489
|
+
createdAt: Date;
|
|
490
|
+
updatedAt: Date;
|
|
491
|
+
email: string;
|
|
492
|
+
emailVerified: boolean;
|
|
493
|
+
name: string;
|
|
494
|
+
image?: string | null | undefined;
|
|
495
|
+
} & {} & {
|
|
496
|
+
username?: string | null | undefined;
|
|
497
|
+
displayUsername?: string | null | undefined;
|
|
498
|
+
}>;
|
|
499
|
+
}) | (Omit<{
|
|
500
|
+
token: string;
|
|
501
|
+
user: {
|
|
502
|
+
id: string;
|
|
503
|
+
createdAt: Date;
|
|
504
|
+
updatedAt: Date;
|
|
505
|
+
email: string;
|
|
506
|
+
emailVerified: boolean;
|
|
507
|
+
name: string;
|
|
508
|
+
image?: string | null | undefined | undefined;
|
|
509
|
+
};
|
|
510
|
+
}, "user"> & {
|
|
511
|
+
user: import("better-auth").StripEmptyObjects<{
|
|
512
|
+
id: string;
|
|
513
|
+
createdAt: Date;
|
|
514
|
+
updatedAt: Date;
|
|
515
|
+
email: string;
|
|
516
|
+
emailVerified: boolean;
|
|
517
|
+
name: string;
|
|
518
|
+
image?: string | null | undefined;
|
|
519
|
+
} & {} & {
|
|
520
|
+
username?: string | null | undefined;
|
|
521
|
+
displayUsername?: string | null | undefined;
|
|
522
|
+
}>;
|
|
523
|
+
}), {
|
|
524
|
+
code?: string | undefined;
|
|
525
|
+
message?: string | undefined;
|
|
526
|
+
}, FetchOptions["throw"] extends true ? true : false>>)>;
|