@better-auth-ui/react 1.6.0 → 1.6.2
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-auth-mutation.d.ts +2 -2
- package/dist/hooks/auth/use-auth-mutation.js +12 -9
- package/dist/hooks/auth/use-auth-query.d.ts +3 -3
- package/dist/hooks/auth/use-auth-query.js +12 -9
- package/dist/hooks/auth/use-authenticate.d.ts +2 -2
- package/dist/hooks/auth/use-authenticate.js +22 -27
- package/dist/hooks/auth/use-is-username-available.d.ts +19 -0
- package/dist/hooks/auth/use-is-username-available.js +12 -0
- package/dist/hooks/auth/use-request-password-reset.d.ts +5 -6
- package/dist/hooks/auth/use-request-password-reset.js +11 -13
- package/dist/hooks/auth/use-reset-password.d.ts +8 -9
- package/dist/hooks/auth/use-reset-password.js +11 -12
- package/dist/hooks/auth/use-send-verification-email.d.ts +5 -6
- package/dist/hooks/auth/use-send-verification-email.js +11 -12
- package/dist/hooks/auth/use-session.d.ts +2 -2
- package/dist/hooks/auth/use-session.js +14 -17
- package/dist/hooks/auth/use-sign-in-email.d.ts +6 -7
- package/dist/hooks/auth/use-sign-in-email.js +17 -23
- package/dist/hooks/auth/use-sign-in-magic-link.d.ts +5 -6
- package/dist/hooks/auth/use-sign-in-magic-link.js +11 -12
- package/dist/hooks/auth/use-sign-in-passkey.d.ts +58 -0
- package/dist/hooks/auth/use-sign-in-passkey.js +18 -0
- package/dist/hooks/auth/use-sign-in-social.d.ts +8 -9
- package/dist/hooks/auth/use-sign-in-social.js +11 -12
- package/dist/hooks/auth/use-sign-in-username.d.ts +53 -0
- package/dist/hooks/auth/use-sign-in-username.js +18 -0
- package/dist/hooks/auth/use-sign-out.d.ts +4 -5
- package/dist/hooks/auth/use-sign-out.js +17 -23
- package/dist/hooks/auth/use-sign-up-email.d.ts +822 -79
- package/dist/hooks/auth/use-sign-up-email.js +17 -23
- package/dist/hooks/auth/use-user.d.ts +58 -58
- package/dist/hooks/auth/use-user.js +10 -13
- package/dist/hooks/settings/use-account-info.d.ts +5 -5
- package/dist/hooks/settings/use-account-info.js +20 -24
- package/dist/hooks/settings/use-add-passkey.d.ts +43 -0
- package/dist/hooks/settings/use-add-passkey.js +18 -0
- package/dist/hooks/settings/use-change-email.d.ts +5 -5
- package/dist/hooks/settings/use-change-email.js +17 -22
- package/dist/hooks/settings/use-change-password.d.ts +6 -7
- package/dist/hooks/settings/use-change-password.js +11 -10
- package/dist/hooks/settings/use-delete-passkey.d.ts +21 -0
- package/dist/hooks/settings/use-delete-passkey.js +18 -0
- package/dist/hooks/settings/use-delete-user.d.ts +8 -9
- package/dist/hooks/settings/use-delete-user.js +11 -10
- package/dist/hooks/settings/use-link-social.d.ts +5 -5
- package/dist/hooks/settings/use-link-social.js +11 -9
- package/dist/hooks/settings/use-list-accounts.d.ts +4 -4
- package/dist/hooks/settings/use-list-accounts.js +20 -22
- package/dist/hooks/settings/use-list-device-sessions.d.ts +2 -2
- package/dist/hooks/settings/use-list-device-sessions.js +20 -21
- package/dist/hooks/settings/use-list-sessions.d.ts +4 -4
- package/dist/hooks/settings/use-list-sessions.js +20 -21
- package/dist/hooks/settings/use-list-user-passkeys.d.ts +11 -0
- package/dist/hooks/settings/use-list-user-passkeys.js +21 -0
- package/dist/hooks/settings/use-revoke-multi-session.d.ts +5 -5
- package/dist/hooks/settings/use-revoke-multi-session.js +17 -19
- package/dist/hooks/settings/use-revoke-session.d.ts +5 -5
- package/dist/hooks/settings/use-revoke-session.js +17 -20
- package/dist/hooks/settings/use-set-active-session.d.ts +5 -5
- package/dist/hooks/settings/use-set-active-session.js +20 -27
- package/dist/hooks/settings/use-unlink-account.d.ts +5 -5
- package/dist/hooks/settings/use-unlink-account.js +17 -20
- package/dist/hooks/settings/use-update-user.d.ts +2 -2
- package/dist/hooks/settings/use-update-user.js +24 -28
- package/dist/index.d.ts +40 -32
- package/dist/index.js +84 -32
- package/dist/lib/auth-client.d.ts +2953 -1241
- package/dist/lib/auth-client.js +11 -5
- 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/package.json +16 -9
- package/src/components/auth/auth-provider.tsx +4 -6
- package/src/hooks/auth/use-authenticate.ts +3 -1
- package/src/hooks/auth/use-is-username-available.ts +22 -0
- package/src/hooks/auth/use-request-password-reset.ts +4 -6
- package/src/hooks/auth/use-reset-password.ts +4 -6
- package/src/hooks/auth/use-send-verification-email.ts +4 -6
- package/src/hooks/auth/use-session.ts +2 -1
- package/src/hooks/auth/use-sign-in-email.ts +9 -10
- package/src/hooks/auth/use-sign-in-magic-link.ts +4 -6
- package/src/hooks/auth/use-sign-in-passkey.ts +34 -0
- package/src/hooks/auth/use-sign-in-social.ts +4 -6
- package/src/hooks/auth/use-sign-in-username.ts +34 -0
- package/src/hooks/auth/use-sign-out.ts +6 -7
- package/src/hooks/auth/use-sign-up-email.ts +9 -10
- package/src/hooks/auth/use-user.ts +1 -2
- package/src/hooks/settings/use-account-info.ts +2 -1
- package/src/hooks/settings/use-add-passkey.ts +32 -0
- package/src/hooks/settings/use-change-email.ts +6 -6
- package/src/hooks/settings/use-change-password.ts +4 -6
- package/src/hooks/settings/use-delete-passkey.ts +32 -0
- package/src/hooks/settings/use-delete-user.ts +4 -6
- package/src/hooks/settings/use-link-social.ts +4 -4
- package/src/hooks/settings/use-list-accounts.ts +3 -1
- package/src/hooks/settings/use-list-device-sessions.ts +3 -1
- package/src/hooks/settings/use-list-sessions.ts +3 -1
- package/src/hooks/settings/use-list-user-passkeys.ts +30 -0
- package/src/hooks/settings/use-revoke-multi-session.ts +6 -6
- package/src/hooks/settings/use-revoke-session.ts +4 -5
- package/src/hooks/settings/use-set-active-session.ts +9 -8
- package/src/hooks/settings/use-unlink-account.ts +4 -5
- package/src/hooks/settings/use-update-user.ts +8 -9
- package/src/index.ts +8 -0
- package/src/lib/auth-client.ts +7 -1
- package/src/lib/auth-config.ts +1 -1
- package/dist/hooks/auth/use-forgot-password.d.ts +0 -20
- package/dist/hooks/auth/use-forgot-password.js +0 -14
- package/dist/hooks/use-hydrated.d.ts +0 -6
- package/dist/hooks/use-hydrated.js +0 -18
- package/dist/lib/auth-config.js +0 -1
- package/dist/lib/auth-hook-options.d.ts +0 -8
- package/dist/lib/auth-hook-options.js +0 -1
|
@@ -1,24 +1,18 @@
|
|
|
1
|
-
import { useAuth
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
options: {
|
|
17
|
-
...options,
|
|
18
|
-
onSuccess: async (...args) => {
|
|
19
|
-
await refetch();
|
|
20
|
-
await options?.onSuccess?.(...args);
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
});
|
|
1
|
+
import { useAuth as e } from "../../components/auth/auth-provider.js";
|
|
2
|
+
import { useAuthMutation as t } from "./use-auth-mutation.js";
|
|
3
|
+
import { useQueryClient as n } from "@tanstack/react-query";
|
|
4
|
+
//#region src/hooks/auth/use-sign-up-email.ts
|
|
5
|
+
function r(r) {
|
|
6
|
+
let { authClient: i } = e(), a = n();
|
|
7
|
+
return t({
|
|
8
|
+
authFn: i.signUp.email,
|
|
9
|
+
options: {
|
|
10
|
+
...r,
|
|
11
|
+
onSuccess: async (...e) => {
|
|
12
|
+
a.resetQueries({ queryKey: ["auth", "getSession"] }), await r?.onSuccess?.(...e);
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
});
|
|
24
16
|
}
|
|
17
|
+
//#endregion
|
|
18
|
+
export { r as useSignUpEmail };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
1
|
+
import { AuthClient } from '../../lib/auth-client';
|
|
2
|
+
import { UseAuthQueryOptions } from './use-auth-query';
|
|
3
3
|
/**
|
|
4
4
|
* Retrieve the current authenticated user.
|
|
5
5
|
*
|
|
@@ -7,7 +7,7 @@ import type { UseAuthQueryOptions } from "./use-auth-query";
|
|
|
7
7
|
* @returns The React Query result with `data` containing the user object from the session.
|
|
8
8
|
*/
|
|
9
9
|
export declare function useUser(options?: Partial<UseAuthQueryOptions<AuthClient["getSession"]>>): {
|
|
10
|
-
error: import(
|
|
10
|
+
error: import('better-auth/client').BetterFetchError;
|
|
11
11
|
isError: true;
|
|
12
12
|
isPending: false;
|
|
13
13
|
isLoading: false;
|
|
@@ -19,7 +19,7 @@ export declare function useUser(options?: Partial<UseAuthQueryOptions<AuthClient
|
|
|
19
19
|
dataUpdatedAt: number;
|
|
20
20
|
errorUpdatedAt: number;
|
|
21
21
|
failureCount: number;
|
|
22
|
-
failureReason: import(
|
|
22
|
+
failureReason: import('better-auth/client').BetterFetchError | null;
|
|
23
23
|
errorUpdateCount: number;
|
|
24
24
|
isFetched: boolean;
|
|
25
25
|
isFetchedAfterMount: boolean;
|
|
@@ -29,8 +29,8 @@ export declare function useUser(options?: Partial<UseAuthQueryOptions<AuthClient
|
|
|
29
29
|
isRefetching: boolean;
|
|
30
30
|
isStale: boolean;
|
|
31
31
|
isEnabled: boolean;
|
|
32
|
-
refetch: (options?: import(
|
|
33
|
-
user: import(
|
|
32
|
+
refetch: (options?: import('@tanstack/react-query').RefetchOptions) => Promise<import('@tanstack/react-query').QueryObserverResult<{
|
|
33
|
+
user: import('better-auth').StripEmptyObjects<{
|
|
34
34
|
id: string;
|
|
35
35
|
createdAt: Date;
|
|
36
36
|
updatedAt: Date;
|
|
@@ -42,7 +42,7 @@ export declare function useUser(options?: Partial<UseAuthQueryOptions<AuthClient
|
|
|
42
42
|
username?: string | null | undefined;
|
|
43
43
|
displayUsername?: string | null | undefined;
|
|
44
44
|
}>;
|
|
45
|
-
session: import(
|
|
45
|
+
session: import('better-auth').StripEmptyObjects<{
|
|
46
46
|
id: string;
|
|
47
47
|
createdAt: Date;
|
|
48
48
|
updatedAt: Date;
|
|
@@ -52,10 +52,10 @@ export declare function useUser(options?: Partial<UseAuthQueryOptions<AuthClient
|
|
|
52
52
|
ipAddress?: string | null | undefined;
|
|
53
53
|
userAgent?: string | null | undefined;
|
|
54
54
|
}>;
|
|
55
|
-
} | null, import(
|
|
56
|
-
fetchStatus: import(
|
|
55
|
+
} | null, import('better-auth/client').BetterFetchError>>;
|
|
56
|
+
fetchStatus: import('@tanstack/react-query').FetchStatus;
|
|
57
57
|
promise: Promise<{
|
|
58
|
-
user: import(
|
|
58
|
+
user: import('better-auth').StripEmptyObjects<{
|
|
59
59
|
id: string;
|
|
60
60
|
createdAt: Date;
|
|
61
61
|
updatedAt: Date;
|
|
@@ -67,7 +67,7 @@ export declare function useUser(options?: Partial<UseAuthQueryOptions<AuthClient
|
|
|
67
67
|
username?: string | null | undefined;
|
|
68
68
|
displayUsername?: string | null | undefined;
|
|
69
69
|
}>;
|
|
70
|
-
session: import(
|
|
70
|
+
session: import('better-auth').StripEmptyObjects<{
|
|
71
71
|
id: string;
|
|
72
72
|
createdAt: Date;
|
|
73
73
|
updatedAt: Date;
|
|
@@ -78,7 +78,7 @@ export declare function useUser(options?: Partial<UseAuthQueryOptions<AuthClient
|
|
|
78
78
|
userAgent?: string | null | undefined;
|
|
79
79
|
}>;
|
|
80
80
|
} | null>;
|
|
81
|
-
data: import(
|
|
81
|
+
data: import('better-auth').StripEmptyObjects<{
|
|
82
82
|
id: string;
|
|
83
83
|
createdAt: Date;
|
|
84
84
|
updatedAt: Date;
|
|
@@ -103,7 +103,7 @@ export declare function useUser(options?: Partial<UseAuthQueryOptions<AuthClient
|
|
|
103
103
|
dataUpdatedAt: number;
|
|
104
104
|
errorUpdatedAt: number;
|
|
105
105
|
failureCount: number;
|
|
106
|
-
failureReason: import(
|
|
106
|
+
failureReason: import('better-auth/client').BetterFetchError | null;
|
|
107
107
|
errorUpdateCount: number;
|
|
108
108
|
isFetched: boolean;
|
|
109
109
|
isFetchedAfterMount: boolean;
|
|
@@ -113,8 +113,8 @@ export declare function useUser(options?: Partial<UseAuthQueryOptions<AuthClient
|
|
|
113
113
|
isRefetching: boolean;
|
|
114
114
|
isStale: boolean;
|
|
115
115
|
isEnabled: boolean;
|
|
116
|
-
refetch: (options?: import(
|
|
117
|
-
user: import(
|
|
116
|
+
refetch: (options?: import('@tanstack/react-query').RefetchOptions) => Promise<import('@tanstack/react-query').QueryObserverResult<{
|
|
117
|
+
user: import('better-auth').StripEmptyObjects<{
|
|
118
118
|
id: string;
|
|
119
119
|
createdAt: Date;
|
|
120
120
|
updatedAt: Date;
|
|
@@ -126,7 +126,7 @@ export declare function useUser(options?: Partial<UseAuthQueryOptions<AuthClient
|
|
|
126
126
|
username?: string | null | undefined;
|
|
127
127
|
displayUsername?: string | null | undefined;
|
|
128
128
|
}>;
|
|
129
|
-
session: import(
|
|
129
|
+
session: import('better-auth').StripEmptyObjects<{
|
|
130
130
|
id: string;
|
|
131
131
|
createdAt: Date;
|
|
132
132
|
updatedAt: Date;
|
|
@@ -136,10 +136,10 @@ export declare function useUser(options?: Partial<UseAuthQueryOptions<AuthClient
|
|
|
136
136
|
ipAddress?: string | null | undefined;
|
|
137
137
|
userAgent?: string | null | undefined;
|
|
138
138
|
}>;
|
|
139
|
-
} | null, import(
|
|
140
|
-
fetchStatus: import(
|
|
139
|
+
} | null, import('better-auth/client').BetterFetchError>>;
|
|
140
|
+
fetchStatus: import('@tanstack/react-query').FetchStatus;
|
|
141
141
|
promise: Promise<{
|
|
142
|
-
user: import(
|
|
142
|
+
user: import('better-auth').StripEmptyObjects<{
|
|
143
143
|
id: string;
|
|
144
144
|
createdAt: Date;
|
|
145
145
|
updatedAt: Date;
|
|
@@ -151,7 +151,7 @@ export declare function useUser(options?: Partial<UseAuthQueryOptions<AuthClient
|
|
|
151
151
|
username?: string | null | undefined;
|
|
152
152
|
displayUsername?: string | null | undefined;
|
|
153
153
|
}>;
|
|
154
|
-
session: import(
|
|
154
|
+
session: import('better-auth').StripEmptyObjects<{
|
|
155
155
|
id: string;
|
|
156
156
|
createdAt: Date;
|
|
157
157
|
updatedAt: Date;
|
|
@@ -162,7 +162,7 @@ export declare function useUser(options?: Partial<UseAuthQueryOptions<AuthClient
|
|
|
162
162
|
userAgent?: string | null | undefined;
|
|
163
163
|
}>;
|
|
164
164
|
} | null>;
|
|
165
|
-
data: import(
|
|
165
|
+
data: import('better-auth').StripEmptyObjects<{
|
|
166
166
|
id: string;
|
|
167
167
|
createdAt: Date;
|
|
168
168
|
updatedAt: Date;
|
|
@@ -175,7 +175,7 @@ export declare function useUser(options?: Partial<UseAuthQueryOptions<AuthClient
|
|
|
175
175
|
displayUsername?: string | null | undefined;
|
|
176
176
|
}> | undefined;
|
|
177
177
|
} | {
|
|
178
|
-
error: import(
|
|
178
|
+
error: import('better-auth/client').BetterFetchError;
|
|
179
179
|
isError: true;
|
|
180
180
|
isPending: false;
|
|
181
181
|
isLoading: false;
|
|
@@ -187,7 +187,7 @@ export declare function useUser(options?: Partial<UseAuthQueryOptions<AuthClient
|
|
|
187
187
|
dataUpdatedAt: number;
|
|
188
188
|
errorUpdatedAt: number;
|
|
189
189
|
failureCount: number;
|
|
190
|
-
failureReason: import(
|
|
190
|
+
failureReason: import('better-auth/client').BetterFetchError | null;
|
|
191
191
|
errorUpdateCount: number;
|
|
192
192
|
isFetched: boolean;
|
|
193
193
|
isFetchedAfterMount: boolean;
|
|
@@ -197,8 +197,8 @@ export declare function useUser(options?: Partial<UseAuthQueryOptions<AuthClient
|
|
|
197
197
|
isRefetching: boolean;
|
|
198
198
|
isStale: boolean;
|
|
199
199
|
isEnabled: boolean;
|
|
200
|
-
refetch: (options?: import(
|
|
201
|
-
user: import(
|
|
200
|
+
refetch: (options?: import('@tanstack/react-query').RefetchOptions) => Promise<import('@tanstack/react-query').QueryObserverResult<{
|
|
201
|
+
user: import('better-auth').StripEmptyObjects<{
|
|
202
202
|
id: string;
|
|
203
203
|
createdAt: Date;
|
|
204
204
|
updatedAt: Date;
|
|
@@ -210,7 +210,7 @@ export declare function useUser(options?: Partial<UseAuthQueryOptions<AuthClient
|
|
|
210
210
|
username?: string | null | undefined;
|
|
211
211
|
displayUsername?: string | null | undefined;
|
|
212
212
|
}>;
|
|
213
|
-
session: import(
|
|
213
|
+
session: import('better-auth').StripEmptyObjects<{
|
|
214
214
|
id: string;
|
|
215
215
|
createdAt: Date;
|
|
216
216
|
updatedAt: Date;
|
|
@@ -220,10 +220,10 @@ export declare function useUser(options?: Partial<UseAuthQueryOptions<AuthClient
|
|
|
220
220
|
ipAddress?: string | null | undefined;
|
|
221
221
|
userAgent?: string | null | undefined;
|
|
222
222
|
}>;
|
|
223
|
-
} | null, import(
|
|
224
|
-
fetchStatus: import(
|
|
223
|
+
} | null, import('better-auth/client').BetterFetchError>>;
|
|
224
|
+
fetchStatus: import('@tanstack/react-query').FetchStatus;
|
|
225
225
|
promise: Promise<{
|
|
226
|
-
user: import(
|
|
226
|
+
user: import('better-auth').StripEmptyObjects<{
|
|
227
227
|
id: string;
|
|
228
228
|
createdAt: Date;
|
|
229
229
|
updatedAt: Date;
|
|
@@ -235,7 +235,7 @@ export declare function useUser(options?: Partial<UseAuthQueryOptions<AuthClient
|
|
|
235
235
|
username?: string | null | undefined;
|
|
236
236
|
displayUsername?: string | null | undefined;
|
|
237
237
|
}>;
|
|
238
|
-
session: import(
|
|
238
|
+
session: import('better-auth').StripEmptyObjects<{
|
|
239
239
|
id: string;
|
|
240
240
|
createdAt: Date;
|
|
241
241
|
updatedAt: Date;
|
|
@@ -246,7 +246,7 @@ export declare function useUser(options?: Partial<UseAuthQueryOptions<AuthClient
|
|
|
246
246
|
userAgent?: string | null | undefined;
|
|
247
247
|
}>;
|
|
248
248
|
} | null>;
|
|
249
|
-
data: import(
|
|
249
|
+
data: import('better-auth').StripEmptyObjects<{
|
|
250
250
|
id: string;
|
|
251
251
|
createdAt: Date;
|
|
252
252
|
updatedAt: Date;
|
|
@@ -271,7 +271,7 @@ export declare function useUser(options?: Partial<UseAuthQueryOptions<AuthClient
|
|
|
271
271
|
dataUpdatedAt: number;
|
|
272
272
|
errorUpdatedAt: number;
|
|
273
273
|
failureCount: number;
|
|
274
|
-
failureReason: import(
|
|
274
|
+
failureReason: import('better-auth/client').BetterFetchError | null;
|
|
275
275
|
errorUpdateCount: number;
|
|
276
276
|
isFetched: boolean;
|
|
277
277
|
isFetchedAfterMount: boolean;
|
|
@@ -281,8 +281,8 @@ export declare function useUser(options?: Partial<UseAuthQueryOptions<AuthClient
|
|
|
281
281
|
isRefetching: boolean;
|
|
282
282
|
isStale: boolean;
|
|
283
283
|
isEnabled: boolean;
|
|
284
|
-
refetch: (options?: import(
|
|
285
|
-
user: import(
|
|
284
|
+
refetch: (options?: import('@tanstack/react-query').RefetchOptions) => Promise<import('@tanstack/react-query').QueryObserverResult<{
|
|
285
|
+
user: import('better-auth').StripEmptyObjects<{
|
|
286
286
|
id: string;
|
|
287
287
|
createdAt: Date;
|
|
288
288
|
updatedAt: Date;
|
|
@@ -294,7 +294,7 @@ export declare function useUser(options?: Partial<UseAuthQueryOptions<AuthClient
|
|
|
294
294
|
username?: string | null | undefined;
|
|
295
295
|
displayUsername?: string | null | undefined;
|
|
296
296
|
}>;
|
|
297
|
-
session: import(
|
|
297
|
+
session: import('better-auth').StripEmptyObjects<{
|
|
298
298
|
id: string;
|
|
299
299
|
createdAt: Date;
|
|
300
300
|
updatedAt: Date;
|
|
@@ -304,10 +304,10 @@ export declare function useUser(options?: Partial<UseAuthQueryOptions<AuthClient
|
|
|
304
304
|
ipAddress?: string | null | undefined;
|
|
305
305
|
userAgent?: string | null | undefined;
|
|
306
306
|
}>;
|
|
307
|
-
} | null, import(
|
|
308
|
-
fetchStatus: import(
|
|
307
|
+
} | null, import('better-auth/client').BetterFetchError>>;
|
|
308
|
+
fetchStatus: import('@tanstack/react-query').FetchStatus;
|
|
309
309
|
promise: Promise<{
|
|
310
|
-
user: import(
|
|
310
|
+
user: import('better-auth').StripEmptyObjects<{
|
|
311
311
|
id: string;
|
|
312
312
|
createdAt: Date;
|
|
313
313
|
updatedAt: Date;
|
|
@@ -319,7 +319,7 @@ export declare function useUser(options?: Partial<UseAuthQueryOptions<AuthClient
|
|
|
319
319
|
username?: string | null | undefined;
|
|
320
320
|
displayUsername?: string | null | undefined;
|
|
321
321
|
}>;
|
|
322
|
-
session: import(
|
|
322
|
+
session: import('better-auth').StripEmptyObjects<{
|
|
323
323
|
id: string;
|
|
324
324
|
createdAt: Date;
|
|
325
325
|
updatedAt: Date;
|
|
@@ -330,7 +330,7 @@ export declare function useUser(options?: Partial<UseAuthQueryOptions<AuthClient
|
|
|
330
330
|
userAgent?: string | null | undefined;
|
|
331
331
|
}>;
|
|
332
332
|
} | null>;
|
|
333
|
-
data: import(
|
|
333
|
+
data: import('better-auth').StripEmptyObjects<{
|
|
334
334
|
id: string;
|
|
335
335
|
createdAt: Date;
|
|
336
336
|
updatedAt: Date;
|
|
@@ -354,7 +354,7 @@ export declare function useUser(options?: Partial<UseAuthQueryOptions<AuthClient
|
|
|
354
354
|
dataUpdatedAt: number;
|
|
355
355
|
errorUpdatedAt: number;
|
|
356
356
|
failureCount: number;
|
|
357
|
-
failureReason: import(
|
|
357
|
+
failureReason: import('better-auth/client').BetterFetchError | null;
|
|
358
358
|
errorUpdateCount: number;
|
|
359
359
|
isFetched: boolean;
|
|
360
360
|
isFetchedAfterMount: boolean;
|
|
@@ -365,8 +365,8 @@ export declare function useUser(options?: Partial<UseAuthQueryOptions<AuthClient
|
|
|
365
365
|
isRefetching: boolean;
|
|
366
366
|
isStale: boolean;
|
|
367
367
|
isEnabled: boolean;
|
|
368
|
-
refetch: (options?: import(
|
|
369
|
-
user: import(
|
|
368
|
+
refetch: (options?: import('@tanstack/react-query').RefetchOptions) => Promise<import('@tanstack/react-query').QueryObserverResult<{
|
|
369
|
+
user: import('better-auth').StripEmptyObjects<{
|
|
370
370
|
id: string;
|
|
371
371
|
createdAt: Date;
|
|
372
372
|
updatedAt: Date;
|
|
@@ -378,7 +378,7 @@ export declare function useUser(options?: Partial<UseAuthQueryOptions<AuthClient
|
|
|
378
378
|
username?: string | null | undefined;
|
|
379
379
|
displayUsername?: string | null | undefined;
|
|
380
380
|
}>;
|
|
381
|
-
session: import(
|
|
381
|
+
session: import('better-auth').StripEmptyObjects<{
|
|
382
382
|
id: string;
|
|
383
383
|
createdAt: Date;
|
|
384
384
|
updatedAt: Date;
|
|
@@ -388,10 +388,10 @@ export declare function useUser(options?: Partial<UseAuthQueryOptions<AuthClient
|
|
|
388
388
|
ipAddress?: string | null | undefined;
|
|
389
389
|
userAgent?: string | null | undefined;
|
|
390
390
|
}>;
|
|
391
|
-
} | null, import(
|
|
392
|
-
fetchStatus: import(
|
|
391
|
+
} | null, import('better-auth/client').BetterFetchError>>;
|
|
392
|
+
fetchStatus: import('@tanstack/react-query').FetchStatus;
|
|
393
393
|
promise: Promise<{
|
|
394
|
-
user: import(
|
|
394
|
+
user: import('better-auth').StripEmptyObjects<{
|
|
395
395
|
id: string;
|
|
396
396
|
createdAt: Date;
|
|
397
397
|
updatedAt: Date;
|
|
@@ -403,7 +403,7 @@ export declare function useUser(options?: Partial<UseAuthQueryOptions<AuthClient
|
|
|
403
403
|
username?: string | null | undefined;
|
|
404
404
|
displayUsername?: string | null | undefined;
|
|
405
405
|
}>;
|
|
406
|
-
session: import(
|
|
406
|
+
session: import('better-auth').StripEmptyObjects<{
|
|
407
407
|
id: string;
|
|
408
408
|
createdAt: Date;
|
|
409
409
|
updatedAt: Date;
|
|
@@ -414,7 +414,7 @@ export declare function useUser(options?: Partial<UseAuthQueryOptions<AuthClient
|
|
|
414
414
|
userAgent?: string | null | undefined;
|
|
415
415
|
}>;
|
|
416
416
|
} | null>;
|
|
417
|
-
data: import(
|
|
417
|
+
data: import('better-auth').StripEmptyObjects<{
|
|
418
418
|
id: string;
|
|
419
419
|
createdAt: Date;
|
|
420
420
|
updatedAt: Date;
|
|
@@ -439,7 +439,7 @@ export declare function useUser(options?: Partial<UseAuthQueryOptions<AuthClient
|
|
|
439
439
|
dataUpdatedAt: number;
|
|
440
440
|
errorUpdatedAt: number;
|
|
441
441
|
failureCount: number;
|
|
442
|
-
failureReason: import(
|
|
442
|
+
failureReason: import('better-auth/client').BetterFetchError | null;
|
|
443
443
|
errorUpdateCount: number;
|
|
444
444
|
isFetched: boolean;
|
|
445
445
|
isFetchedAfterMount: boolean;
|
|
@@ -449,8 +449,8 @@ export declare function useUser(options?: Partial<UseAuthQueryOptions<AuthClient
|
|
|
449
449
|
isRefetching: boolean;
|
|
450
450
|
isStale: boolean;
|
|
451
451
|
isEnabled: boolean;
|
|
452
|
-
refetch: (options?: import(
|
|
453
|
-
user: import(
|
|
452
|
+
refetch: (options?: import('@tanstack/react-query').RefetchOptions) => Promise<import('@tanstack/react-query').QueryObserverResult<{
|
|
453
|
+
user: import('better-auth').StripEmptyObjects<{
|
|
454
454
|
id: string;
|
|
455
455
|
createdAt: Date;
|
|
456
456
|
updatedAt: Date;
|
|
@@ -462,7 +462,7 @@ export declare function useUser(options?: Partial<UseAuthQueryOptions<AuthClient
|
|
|
462
462
|
username?: string | null | undefined;
|
|
463
463
|
displayUsername?: string | null | undefined;
|
|
464
464
|
}>;
|
|
465
|
-
session: import(
|
|
465
|
+
session: import('better-auth').StripEmptyObjects<{
|
|
466
466
|
id: string;
|
|
467
467
|
createdAt: Date;
|
|
468
468
|
updatedAt: Date;
|
|
@@ -472,10 +472,10 @@ export declare function useUser(options?: Partial<UseAuthQueryOptions<AuthClient
|
|
|
472
472
|
ipAddress?: string | null | undefined;
|
|
473
473
|
userAgent?: string | null | undefined;
|
|
474
474
|
}>;
|
|
475
|
-
} | null, import(
|
|
476
|
-
fetchStatus: import(
|
|
475
|
+
} | null, import('better-auth/client').BetterFetchError>>;
|
|
476
|
+
fetchStatus: import('@tanstack/react-query').FetchStatus;
|
|
477
477
|
promise: Promise<{
|
|
478
|
-
user: import(
|
|
478
|
+
user: import('better-auth').StripEmptyObjects<{
|
|
479
479
|
id: string;
|
|
480
480
|
createdAt: Date;
|
|
481
481
|
updatedAt: Date;
|
|
@@ -487,7 +487,7 @@ export declare function useUser(options?: Partial<UseAuthQueryOptions<AuthClient
|
|
|
487
487
|
username?: string | null | undefined;
|
|
488
488
|
displayUsername?: string | null | undefined;
|
|
489
489
|
}>;
|
|
490
|
-
session: import(
|
|
490
|
+
session: import('better-auth').StripEmptyObjects<{
|
|
491
491
|
id: string;
|
|
492
492
|
createdAt: Date;
|
|
493
493
|
updatedAt: Date;
|
|
@@ -498,7 +498,7 @@ export declare function useUser(options?: Partial<UseAuthQueryOptions<AuthClient
|
|
|
498
498
|
userAgent?: string | null | undefined;
|
|
499
499
|
}>;
|
|
500
500
|
} | null>;
|
|
501
|
-
data: import(
|
|
501
|
+
data: import('better-auth').StripEmptyObjects<{
|
|
502
502
|
id: string;
|
|
503
503
|
createdAt: Date;
|
|
504
504
|
updatedAt: Date;
|
|
@@ -1,14 +1,11 @@
|
|
|
1
|
-
import { useSession } from "./use-session";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
const { data, ...rest } = useSession(options);
|
|
10
|
-
return {
|
|
11
|
-
data: data?.user,
|
|
12
|
-
...rest
|
|
13
|
-
};
|
|
1
|
+
import { useSession as e } from "./use-session.js";
|
|
2
|
+
//#region src/hooks/auth/use-user.ts
|
|
3
|
+
function t(t) {
|
|
4
|
+
let { data: n, ...r } = e(t);
|
|
5
|
+
return {
|
|
6
|
+
data: n?.user,
|
|
7
|
+
...r
|
|
8
|
+
};
|
|
14
9
|
}
|
|
10
|
+
//#endregion
|
|
11
|
+
export { t as useUser };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { AuthClient } from '../../lib/auth-client';
|
|
2
|
+
import { UseAuthQueryOptions } from '../auth/use-auth-query';
|
|
3
3
|
/**
|
|
4
4
|
* Retrieve provider-specific account info for a given account ID.
|
|
5
5
|
*
|
|
@@ -11,7 +11,7 @@ import { type UseAuthQueryOptions } from "../auth/use-auth-query";
|
|
|
11
11
|
* @param options - Optional react-query options forwarded to `useQuery`
|
|
12
12
|
* @returns The react-query result containing account info data, loading state, and error state
|
|
13
13
|
*/
|
|
14
|
-
export declare function useAccountInfo(accountId?: string, options?: Partial<UseAuthQueryOptions<AuthClient["accountInfo"]>>): import(
|
|
15
|
-
user: import(
|
|
14
|
+
export declare function useAccountInfo(accountId?: string, options?: Partial<UseAuthQueryOptions<AuthClient["accountInfo"]>>): import('@tanstack/react-query').UseQueryResult<{
|
|
15
|
+
user: import('better-auth').OAuth2UserInfo;
|
|
16
16
|
data: Record<string, any>;
|
|
17
|
-
} | null, import(
|
|
17
|
+
} | null, import('better-auth/client').BetterFetchError>;
|
|
@@ -1,25 +1,21 @@
|
|
|
1
|
-
import { useAuth } from "
|
|
2
|
-
import { useAuthQuery } from "../auth/use-auth-query";
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
options: {
|
|
20
|
-
queryKey: ["auth", "accountInfo", accountId],
|
|
21
|
-
enabled: !!accountId,
|
|
22
|
-
...options
|
|
23
|
-
}
|
|
24
|
-
});
|
|
1
|
+
import { useAuth as e } from "../../components/auth/auth-provider.js";
|
|
2
|
+
import { useAuthQuery as t } from "../auth/use-auth-query.js";
|
|
3
|
+
//#region src/hooks/settings/use-account-info.ts
|
|
4
|
+
function n(n, r) {
|
|
5
|
+
let { authClient: i } = e();
|
|
6
|
+
return t({
|
|
7
|
+
authFn: i.accountInfo,
|
|
8
|
+
params: { query: { accountId: n } },
|
|
9
|
+
options: {
|
|
10
|
+
queryKey: [
|
|
11
|
+
"auth",
|
|
12
|
+
"accountInfo",
|
|
13
|
+
n
|
|
14
|
+
],
|
|
15
|
+
enabled: !!n,
|
|
16
|
+
...r
|
|
17
|
+
}
|
|
18
|
+
});
|
|
25
19
|
}
|
|
20
|
+
//#endregion
|
|
21
|
+
export { n as useAccountInfo };
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { AuthClient } from '../../lib/auth-client';
|
|
2
|
+
import { UseAuthMutationOptions } from '../auth/use-auth-mutation';
|
|
3
|
+
/**
|
|
4
|
+
* Hook that creates a mutation for adding a new passkey.
|
|
5
|
+
*
|
|
6
|
+
* Refetches the passkeys list on success.
|
|
7
|
+
*
|
|
8
|
+
* @returns The `useMutation` result.
|
|
9
|
+
*/
|
|
10
|
+
export declare function useAddPasskey(options?: UseAuthMutationOptions<AuthClient["passkey"]["addPasskey"]>): import('../..').UseAuthMutationResult<(opts?: {
|
|
11
|
+
fetchOptions?: import('better-auth').ClientFetchOption;
|
|
12
|
+
name?: string;
|
|
13
|
+
authenticatorAttachment?: "platform" | "cross-platform";
|
|
14
|
+
context?: string | null;
|
|
15
|
+
extensions?: import('@better-auth/passkey/client').AuthenticationExtensionsClientInputs;
|
|
16
|
+
useAutoRegister?: boolean;
|
|
17
|
+
returnWebAuthnResponse?: boolean;
|
|
18
|
+
} | undefined, fetchOpts?: import('better-auth').ClientFetchOption | undefined) => Promise<{
|
|
19
|
+
data: null;
|
|
20
|
+
error: {
|
|
21
|
+
message?: string | undefined;
|
|
22
|
+
status: number;
|
|
23
|
+
statusText: string;
|
|
24
|
+
};
|
|
25
|
+
} | {
|
|
26
|
+
data: import('@better-auth/passkey/client').Passkey;
|
|
27
|
+
error: null;
|
|
28
|
+
} | {
|
|
29
|
+
webauthn: {
|
|
30
|
+
response: import('@better-auth/passkey/client').RegistrationResponseJSON;
|
|
31
|
+
clientExtensionResults: import('@better-auth/passkey/client').AuthenticationExtensionsClientOutputs;
|
|
32
|
+
};
|
|
33
|
+
data: import('@better-auth/passkey/client').Passkey;
|
|
34
|
+
error: null;
|
|
35
|
+
} | {
|
|
36
|
+
data: null;
|
|
37
|
+
error: {
|
|
38
|
+
code: string;
|
|
39
|
+
message: string;
|
|
40
|
+
status: number;
|
|
41
|
+
statusText: string;
|
|
42
|
+
};
|
|
43
|
+
}>>;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { useAuth as e } from "../../components/auth/auth-provider.js";
|
|
2
|
+
import { useAuthMutation as t } from "../auth/use-auth-mutation.js";
|
|
3
|
+
import { useListUserPasskeys as n } from "./use-list-user-passkeys.js";
|
|
4
|
+
//#region src/hooks/settings/use-add-passkey.ts
|
|
5
|
+
function r(r) {
|
|
6
|
+
let { authClient: i } = e(), { refetch: a } = n();
|
|
7
|
+
return t({
|
|
8
|
+
authFn: i.passkey.addPasskey,
|
|
9
|
+
options: {
|
|
10
|
+
...r,
|
|
11
|
+
onSuccess: async (...e) => {
|
|
12
|
+
await a(), await r?.onSuccess?.(...e);
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
});
|
|
16
|
+
}
|
|
17
|
+
//#endregion
|
|
18
|
+
export { r as useAddPasskey };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import
|
|
1
|
+
import { AuthClient } from '../../lib/auth-client';
|
|
2
|
+
import { UseAuthMutationOptions } from '../auth/use-auth-mutation';
|
|
3
3
|
/**
|
|
4
4
|
* Hook that creates a mutation for changing the current user's email address.
|
|
5
5
|
*
|
|
@@ -8,15 +8,15 @@ import type { UseAuthMutationOptions } from "../auth/use-auth-mutation";
|
|
|
8
8
|
*
|
|
9
9
|
* @returns The `useMutation` result.
|
|
10
10
|
*/
|
|
11
|
-
export declare function useChangeEmail(options?: UseAuthMutationOptions<AuthClient["changeEmail"]>): import(
|
|
11
|
+
export declare function useChangeEmail(options?: UseAuthMutationOptions<AuthClient["changeEmail"]>): import('../..').UseAuthMutationResult<(<FetchOptions extends import('better-auth').ClientFetchOption<Partial<{
|
|
12
12
|
newEmail: string;
|
|
13
13
|
callbackURL?: string | undefined;
|
|
14
|
-
}> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: import(
|
|
14
|
+
}> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: import('better-auth').Prettify<{
|
|
15
15
|
newEmail: string;
|
|
16
16
|
callbackURL?: string | undefined;
|
|
17
17
|
} & {
|
|
18
18
|
fetchOptions?: FetchOptions | undefined;
|
|
19
|
-
}>, data_1?: FetchOptions | undefined) => Promise<import(
|
|
19
|
+
}>, data_1?: FetchOptions | undefined) => Promise<import('better-auth/client').BetterFetchResponse<{
|
|
20
20
|
status: boolean;
|
|
21
21
|
}, {
|
|
22
22
|
code?: string | undefined;
|
|
@@ -1,23 +1,18 @@
|
|
|
1
|
-
import { useAuth
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
...options,
|
|
17
|
-
onSuccess: async (...args) => {
|
|
18
|
-
refetch();
|
|
19
|
-
await options?.onSuccess?.(...args);
|
|
20
|
-
}
|
|
21
|
-
}
|
|
22
|
-
});
|
|
1
|
+
import { useAuth as e } from "../../components/auth/auth-provider.js";
|
|
2
|
+
import { useAuthMutation as t } from "../auth/use-auth-mutation.js";
|
|
3
|
+
import { useSession as n } from "../auth/use-session.js";
|
|
4
|
+
//#region src/hooks/settings/use-change-email.ts
|
|
5
|
+
function r(r) {
|
|
6
|
+
let { authClient: i } = e(), { refetch: a } = n({ refetchOnMount: !1 });
|
|
7
|
+
return t({
|
|
8
|
+
authFn: i.changeEmail,
|
|
9
|
+
options: {
|
|
10
|
+
...r,
|
|
11
|
+
onSuccess: async (...e) => {
|
|
12
|
+
a(), await r?.onSuccess?.(...e);
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
});
|
|
23
16
|
}
|
|
17
|
+
//#endregion
|
|
18
|
+
export { r as useChangeEmail };
|