@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,54 @@
|
|
|
1
|
+
import { type AuthClient } from "@better-auth-ui/react";
|
|
2
|
+
import type { UseAuthMutationOptions } from "../auth/use-auth-mutation";
|
|
3
|
+
export { useAuthMutation } from "../auth/use-auth-mutation";
|
|
4
|
+
/**
|
|
5
|
+
* Hook that creates a mutation for changing the authenticated user's password.
|
|
6
|
+
*
|
|
7
|
+
* @returns The `useMutation` result.
|
|
8
|
+
*/
|
|
9
|
+
export declare function useChangePassword(options?: UseAuthMutationOptions<AuthClient["changePassword"]>): import("../auth/use-auth-mutation").UseAuthMutationResult<(<FetchOptions extends import("better-auth").ClientFetchOption<Partial<{
|
|
10
|
+
newPassword: string;
|
|
11
|
+
currentPassword: string;
|
|
12
|
+
revokeOtherSessions?: boolean | undefined;
|
|
13
|
+
}> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: import("better-auth").Prettify<{
|
|
14
|
+
newPassword: string;
|
|
15
|
+
currentPassword: string;
|
|
16
|
+
revokeOtherSessions?: boolean | undefined;
|
|
17
|
+
} & {
|
|
18
|
+
fetchOptions?: FetchOptions | undefined;
|
|
19
|
+
}>, data_1?: FetchOptions | undefined) => Promise<import("better-auth/react").BetterFetchResponse<Omit<{
|
|
20
|
+
token: string | null;
|
|
21
|
+
user: {
|
|
22
|
+
id: string;
|
|
23
|
+
createdAt: Date;
|
|
24
|
+
updatedAt: Date;
|
|
25
|
+
email: string;
|
|
26
|
+
emailVerified: boolean;
|
|
27
|
+
name: string;
|
|
28
|
+
image?: string | null | undefined;
|
|
29
|
+
} & Record<string, any> & {
|
|
30
|
+
id: string;
|
|
31
|
+
createdAt: Date;
|
|
32
|
+
updatedAt: Date;
|
|
33
|
+
email: string;
|
|
34
|
+
emailVerified: boolean;
|
|
35
|
+
name: string;
|
|
36
|
+
image?: string | null | undefined;
|
|
37
|
+
};
|
|
38
|
+
}, "user"> & {
|
|
39
|
+
user: import("better-auth").StripEmptyObjects<{
|
|
40
|
+
id: string;
|
|
41
|
+
createdAt: Date;
|
|
42
|
+
updatedAt: Date;
|
|
43
|
+
email: string;
|
|
44
|
+
emailVerified: boolean;
|
|
45
|
+
name: string;
|
|
46
|
+
image?: string | null | undefined;
|
|
47
|
+
} & {} & {
|
|
48
|
+
username?: string | null | undefined;
|
|
49
|
+
displayUsername?: string | null | undefined;
|
|
50
|
+
}>;
|
|
51
|
+
}, {
|
|
52
|
+
code?: string | undefined;
|
|
53
|
+
message?: string | undefined;
|
|
54
|
+
}, FetchOptions["throw"] extends true ? true : false>>)>;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { useAuth, useAuthMutation } from "@better-auth-ui/react";
|
|
2
|
+
export { useAuthMutation } from "../auth/use-auth-mutation";
|
|
3
|
+
/**
|
|
4
|
+
* Hook that creates a mutation for changing the authenticated user's password.
|
|
5
|
+
*
|
|
6
|
+
* @returns The `useMutation` result.
|
|
7
|
+
*/
|
|
8
|
+
export function useChangePassword(options) {
|
|
9
|
+
const { authClient } = useAuth();
|
|
10
|
+
return useAuthMutation({ authFn: authClient.changePassword, options });
|
|
11
|
+
}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { type AuthClient } from "@better-auth-ui/react";
|
|
2
|
+
import type { UseAuthMutationOptions } from "../auth/use-auth-mutation";
|
|
3
|
+
export { useAuthMutation } from "../auth/use-auth-mutation";
|
|
4
|
+
/**
|
|
5
|
+
* Hook that creates a mutation for deleting the authenticated user account.
|
|
6
|
+
*
|
|
7
|
+
* @returns The `useMutation` result.
|
|
8
|
+
*/
|
|
9
|
+
export declare function useDeleteUser(options?: UseAuthMutationOptions<AuthClient["deleteUser"]>): import("../auth/use-auth-mutation").UseAuthMutationResult<(<FetchOptions extends import("better-auth").ClientFetchOption<Partial<{
|
|
10
|
+
callbackURL?: string | undefined;
|
|
11
|
+
password?: string | undefined;
|
|
12
|
+
token?: string | undefined;
|
|
13
|
+
}> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0?: import("better-auth").Prettify<{
|
|
14
|
+
callbackURL?: string | undefined;
|
|
15
|
+
password?: string | undefined;
|
|
16
|
+
token?: string | undefined;
|
|
17
|
+
} & {
|
|
18
|
+
fetchOptions?: FetchOptions | undefined;
|
|
19
|
+
}> | undefined, data_1?: FetchOptions | undefined) => Promise<import("better-auth/react").BetterFetchResponse<{
|
|
20
|
+
success: boolean;
|
|
21
|
+
message: string;
|
|
22
|
+
}, {
|
|
23
|
+
code?: string | undefined;
|
|
24
|
+
message?: string | undefined;
|
|
25
|
+
}, FetchOptions["throw"] extends true ? true : false>>) & {
|
|
26
|
+
callback: <FetchOptions extends import("better-auth").ClientFetchOption<never, Partial<{
|
|
27
|
+
token: string;
|
|
28
|
+
callbackURL?: string | undefined;
|
|
29
|
+
}> & Record<string, any>, Record<string, any> | undefined>>(data_0: import("better-auth").Prettify<{
|
|
30
|
+
query: {
|
|
31
|
+
token: string;
|
|
32
|
+
callbackURL?: string | undefined;
|
|
33
|
+
};
|
|
34
|
+
fetchOptions?: FetchOptions | undefined;
|
|
35
|
+
}>, data_1?: FetchOptions | undefined) => Promise<import("better-auth/react").BetterFetchResponse<{
|
|
36
|
+
success: boolean;
|
|
37
|
+
message: string;
|
|
38
|
+
}, {
|
|
39
|
+
code?: string | undefined;
|
|
40
|
+
message?: string | undefined;
|
|
41
|
+
}, FetchOptions["throw"] extends true ? true : false>>;
|
|
42
|
+
}>;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { useAuth, useAuthMutation } from "@better-auth-ui/react";
|
|
2
|
+
export { useAuthMutation } from "../auth/use-auth-mutation";
|
|
3
|
+
/**
|
|
4
|
+
* Hook that creates a mutation for deleting the authenticated user account.
|
|
5
|
+
*
|
|
6
|
+
* @returns The `useMutation` result.
|
|
7
|
+
*/
|
|
8
|
+
export function useDeleteUser(options) {
|
|
9
|
+
const { authClient } = useAuth();
|
|
10
|
+
return useAuthMutation({ authFn: authClient.deleteUser, options });
|
|
11
|
+
}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { type AuthClient } from "@better-auth-ui/react";
|
|
2
|
+
import type { UseAuthMutationOptions } from "../auth/use-auth-mutation";
|
|
3
|
+
/**
|
|
4
|
+
* Hook that creates a mutation for linking a social provider to the current user.
|
|
5
|
+
*
|
|
6
|
+
* @returns The `useMutation` result.
|
|
7
|
+
*/
|
|
8
|
+
export declare function useLinkSocial(options?: UseAuthMutationOptions<AuthClient["linkSocial"]>): import("../auth/use-auth-mutation").UseAuthMutationResult<(<FetchOptions extends import("better-auth").ClientFetchOption<Partial<{
|
|
9
|
+
provider: unknown;
|
|
10
|
+
callbackURL?: string | undefined;
|
|
11
|
+
idToken?: {
|
|
12
|
+
token: string;
|
|
13
|
+
nonce?: string | undefined;
|
|
14
|
+
accessToken?: string | undefined;
|
|
15
|
+
refreshToken?: string | undefined;
|
|
16
|
+
scopes?: string[] | undefined;
|
|
17
|
+
} | undefined;
|
|
18
|
+
requestSignUp?: boolean | undefined;
|
|
19
|
+
scopes?: string[] | undefined;
|
|
20
|
+
errorCallbackURL?: string | undefined;
|
|
21
|
+
disableRedirect?: boolean | undefined;
|
|
22
|
+
additionalData?: Record<string, any> | undefined;
|
|
23
|
+
}> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: import("better-auth").Prettify<{
|
|
24
|
+
provider: unknown;
|
|
25
|
+
callbackURL?: string | undefined;
|
|
26
|
+
idToken?: {
|
|
27
|
+
token: string;
|
|
28
|
+
nonce?: string | undefined;
|
|
29
|
+
accessToken?: string | undefined;
|
|
30
|
+
refreshToken?: string | undefined;
|
|
31
|
+
scopes?: string[] | undefined;
|
|
32
|
+
} | undefined;
|
|
33
|
+
requestSignUp?: boolean | undefined;
|
|
34
|
+
scopes?: string[] | undefined;
|
|
35
|
+
errorCallbackURL?: string | undefined;
|
|
36
|
+
disableRedirect?: boolean | undefined;
|
|
37
|
+
additionalData?: Record<string, any> | undefined;
|
|
38
|
+
} & {
|
|
39
|
+
fetchOptions?: FetchOptions | undefined;
|
|
40
|
+
}>, data_1?: FetchOptions | undefined) => Promise<import("better-auth/react").BetterFetchResponse<{
|
|
41
|
+
url: string;
|
|
42
|
+
redirect: boolean;
|
|
43
|
+
}, {
|
|
44
|
+
code?: string | undefined;
|
|
45
|
+
message?: string | undefined;
|
|
46
|
+
}, FetchOptions["throw"] extends true ? true : false>>)>;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { useAuth, useAuthMutation } from "@better-auth-ui/react";
|
|
2
|
+
/**
|
|
3
|
+
* Hook that creates a mutation for linking a social provider to the current user.
|
|
4
|
+
*
|
|
5
|
+
* @returns The `useMutation` result.
|
|
6
|
+
*/
|
|
7
|
+
export function useLinkSocial(options) {
|
|
8
|
+
const { authClient } = useAuth();
|
|
9
|
+
return useAuthMutation({ authFn: authClient.linkSocial, options });
|
|
10
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { type AuthClient } from "@better-auth-ui/react";
|
|
2
|
+
import { type UseAuthQueryOptions } from "../auth/use-auth-query";
|
|
3
|
+
/**
|
|
4
|
+
* Retrieve the current user's linked social accounts.
|
|
5
|
+
*
|
|
6
|
+
* The query runs only when at least one social provider is configured and a session exists.
|
|
7
|
+
* The provided `options` are forwarded to both `useSession` and `useQuery`, allowing customization of initial data and query behavior.
|
|
8
|
+
*
|
|
9
|
+
* @param options - Optional react-query / initial-data options forwarded to `useSession` and `useQuery`
|
|
10
|
+
* @returns The react-query result containing linked accounts data, loading state, and error state
|
|
11
|
+
*/
|
|
12
|
+
export declare function useListAccounts(options?: Partial<UseAuthQueryOptions<AuthClient["listAccounts"]>>): import("@tanstack/react-query").UseQueryResult<{
|
|
13
|
+
scopes: string[];
|
|
14
|
+
id: string;
|
|
15
|
+
createdAt: Date;
|
|
16
|
+
updatedAt: Date;
|
|
17
|
+
userId: string;
|
|
18
|
+
providerId: string;
|
|
19
|
+
accountId: string;
|
|
20
|
+
}[] | null, import("better-auth/react").BetterFetchError>;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { useAuth, useSession } from "@better-auth-ui/react";
|
|
2
|
+
import { useAuthQuery } from "../auth/use-auth-query";
|
|
3
|
+
/**
|
|
4
|
+
* Retrieve the current user's linked social accounts.
|
|
5
|
+
*
|
|
6
|
+
* The query runs only when at least one social provider is configured and a session exists.
|
|
7
|
+
* The provided `options` are forwarded to both `useSession` and `useQuery`, allowing customization of initial data and query behavior.
|
|
8
|
+
*
|
|
9
|
+
* @param options - Optional react-query / initial-data options forwarded to `useSession` and `useQuery`
|
|
10
|
+
* @returns The react-query result containing linked accounts data, loading state, and error state
|
|
11
|
+
*/
|
|
12
|
+
export function useListAccounts(options) {
|
|
13
|
+
const { authClient } = useAuth();
|
|
14
|
+
const { data: session } = useSession({ refetchOnMount: false });
|
|
15
|
+
return useAuthQuery({
|
|
16
|
+
authFn: authClient.listAccounts,
|
|
17
|
+
options: {
|
|
18
|
+
queryKey: ["auth", "listAccounts", session?.user.id],
|
|
19
|
+
enabled: !!session,
|
|
20
|
+
...options
|
|
21
|
+
}
|
|
22
|
+
});
|
|
23
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { type AuthClient } from "@better-auth-ui/react";
|
|
2
|
+
import { type UseAuthQueryOptions, type UseAuthQueryResult } from "../auth/use-auth-query";
|
|
3
|
+
/**
|
|
4
|
+
* Retrieve device sessions for multi-session account switching.
|
|
5
|
+
*
|
|
6
|
+
* The query is enabled only when `multiSession` is true and session data is available.
|
|
7
|
+
*
|
|
8
|
+
* @param options - Optional React Query options to customize the query behavior.
|
|
9
|
+
* @returns The React Query result for the device sessions list; `data` is the array of device session objects and includes loading and error states.
|
|
10
|
+
*/
|
|
11
|
+
export declare function useListDeviceSessions(options?: Partial<UseAuthQueryOptions<AuthClient["multiSession"]["listDeviceSessions"]>>): UseAuthQueryResult<AuthClient["multiSession"]["listDeviceSessions"]>;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { useAuth, useSession } from "@better-auth-ui/react";
|
|
2
|
+
import { useAuthQuery } from "../auth/use-auth-query";
|
|
3
|
+
/**
|
|
4
|
+
* Retrieve device sessions for multi-session account switching.
|
|
5
|
+
*
|
|
6
|
+
* The query is enabled only when `multiSession` is true and session data is available.
|
|
7
|
+
*
|
|
8
|
+
* @param options - Optional React Query options to customize the query behavior.
|
|
9
|
+
* @returns The React Query result for the device sessions list; `data` is the array of device session objects and includes loading and error states.
|
|
10
|
+
*/
|
|
11
|
+
export function useListDeviceSessions(options) {
|
|
12
|
+
const { authClient } = useAuth();
|
|
13
|
+
const { data: session } = useSession({ refetchOnMount: false });
|
|
14
|
+
return useAuthQuery({
|
|
15
|
+
authFn: authClient.multiSession.listDeviceSessions,
|
|
16
|
+
options: {
|
|
17
|
+
queryKey: ["auth", "multiSession", "listDeviceSessions"],
|
|
18
|
+
enabled: !!session,
|
|
19
|
+
...options
|
|
20
|
+
}
|
|
21
|
+
});
|
|
22
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { type AuthClient } from "@better-auth-ui/react";
|
|
2
|
+
import { type UseAuthQueryOptions } from "../auth/use-auth-query";
|
|
3
|
+
/**
|
|
4
|
+
* Retrieve the active sessions (devices where the current user is signed in).
|
|
5
|
+
*
|
|
6
|
+
* The underlying query is enabled only when session data is available.
|
|
7
|
+
*
|
|
8
|
+
* @param options - Optional React Query options to customize the query behavior.
|
|
9
|
+
* @returns The React Query result for the sessions list; `data` is the array of session objects, and the result includes loading and error states.
|
|
10
|
+
*/
|
|
11
|
+
export declare function useListSessions(options?: Partial<UseAuthQueryOptions<AuthClient["listSessions"]>>): import("@tanstack/react-query").UseQueryResult<import("better-auth").Prettify<{
|
|
12
|
+
id: string;
|
|
13
|
+
createdAt: Date;
|
|
14
|
+
updatedAt: Date;
|
|
15
|
+
userId: string;
|
|
16
|
+
expiresAt: Date;
|
|
17
|
+
token: string;
|
|
18
|
+
ipAddress?: string | null | undefined | undefined;
|
|
19
|
+
userAgent?: string | null | undefined | undefined;
|
|
20
|
+
}>[] | null, import("better-auth/react").BetterFetchError>;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { useAuth, useSession } from "@better-auth-ui/react";
|
|
2
|
+
import { useAuthQuery } from "../auth/use-auth-query";
|
|
3
|
+
/**
|
|
4
|
+
* Retrieve the active sessions (devices where the current user is signed in).
|
|
5
|
+
*
|
|
6
|
+
* The underlying query is enabled only when session data is available.
|
|
7
|
+
*
|
|
8
|
+
* @param options - Optional React Query options to customize the query behavior.
|
|
9
|
+
* @returns The React Query result for the sessions list; `data` is the array of session objects, and the result includes loading and error states.
|
|
10
|
+
*/
|
|
11
|
+
export function useListSessions(options) {
|
|
12
|
+
const { authClient } = useAuth();
|
|
13
|
+
const { data: session } = useSession({ refetchOnMount: false });
|
|
14
|
+
return useAuthQuery({
|
|
15
|
+
authFn: authClient.listSessions,
|
|
16
|
+
options: {
|
|
17
|
+
queryKey: ["auth", "listSessions", session?.user.id],
|
|
18
|
+
enabled: !!session,
|
|
19
|
+
...options
|
|
20
|
+
}
|
|
21
|
+
});
|
|
22
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { type AuthClient } from "@better-auth-ui/react";
|
|
2
|
+
import type { UseAuthMutationOptions } from "../auth/use-auth-mutation";
|
|
3
|
+
/**
|
|
4
|
+
* Hook that creates a mutation for revoking a device session in multi-session mode.
|
|
5
|
+
*
|
|
6
|
+
* @returns The `useMutation` result.
|
|
7
|
+
*/
|
|
8
|
+
export declare function useRevokeMultiSession(options?: UseAuthMutationOptions<AuthClient["multiSession"]["revoke"]>): import("../auth/use-auth-mutation").UseAuthMutationResult<(<FetchOptions extends import("better-auth").ClientFetchOption<Partial<{
|
|
9
|
+
sessionToken: string;
|
|
10
|
+
}> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: import("better-auth").Prettify<{
|
|
11
|
+
sessionToken: string;
|
|
12
|
+
} & {
|
|
13
|
+
fetchOptions?: FetchOptions | undefined;
|
|
14
|
+
}>, data_1?: FetchOptions | undefined) => Promise<import("better-auth/react").BetterFetchResponse<{
|
|
15
|
+
status: boolean;
|
|
16
|
+
}, {
|
|
17
|
+
code?: string | undefined;
|
|
18
|
+
message?: string | undefined;
|
|
19
|
+
}, FetchOptions["throw"] extends true ? true : false>>)>;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { useAuth, useAuthMutation, useListDeviceSessions } from "@better-auth-ui/react";
|
|
2
|
+
/**
|
|
3
|
+
* Hook that creates a mutation for revoking a device session in multi-session mode.
|
|
4
|
+
*
|
|
5
|
+
* @returns The `useMutation` result.
|
|
6
|
+
*/
|
|
7
|
+
export function useRevokeMultiSession(options) {
|
|
8
|
+
const { authClient } = useAuth();
|
|
9
|
+
const { refetch } = useListDeviceSessions({ refetchOnMount: false });
|
|
10
|
+
return useAuthMutation({
|
|
11
|
+
authFn: authClient.multiSession.revoke,
|
|
12
|
+
options: {
|
|
13
|
+
...options,
|
|
14
|
+
onSuccess: async (...args) => {
|
|
15
|
+
await refetch();
|
|
16
|
+
await options?.onSuccess?.(...args);
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
});
|
|
20
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { type AuthClient } from "@better-auth-ui/react";
|
|
2
|
+
import type { UseAuthMutationOptions } from "../auth/use-auth-mutation";
|
|
3
|
+
/**
|
|
4
|
+
* Hook that creates a mutation for revoking a user session.
|
|
5
|
+
*
|
|
6
|
+
* @returns The `useMutation` result.
|
|
7
|
+
*/
|
|
8
|
+
export declare function useRevokeSession(options?: UseAuthMutationOptions<AuthClient["revokeSession"]>): import("../auth/use-auth-mutation").UseAuthMutationResult<(<FetchOptions extends import("better-auth").ClientFetchOption<Partial<{
|
|
9
|
+
token: string;
|
|
10
|
+
}> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: import("better-auth").Prettify<{
|
|
11
|
+
token: string;
|
|
12
|
+
} & {
|
|
13
|
+
fetchOptions?: FetchOptions | undefined;
|
|
14
|
+
}>, data_1?: FetchOptions | undefined) => Promise<import("better-auth/react").BetterFetchResponse<{
|
|
15
|
+
status: boolean;
|
|
16
|
+
}, {
|
|
17
|
+
code?: string | undefined;
|
|
18
|
+
message?: string | undefined;
|
|
19
|
+
}, FetchOptions["throw"] extends true ? true : false>>)>;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { useAuth, useAuthMutation } from "@better-auth-ui/react";
|
|
2
|
+
import { useListSessions } from "./use-list-sessions";
|
|
3
|
+
/**
|
|
4
|
+
* Hook that creates a mutation for revoking a user session.
|
|
5
|
+
*
|
|
6
|
+
* @returns The `useMutation` result.
|
|
7
|
+
*/
|
|
8
|
+
export function useRevokeSession(options) {
|
|
9
|
+
const { authClient } = useAuth();
|
|
10
|
+
const { refetch } = useListSessions({ refetchOnMount: false });
|
|
11
|
+
return useAuthMutation({
|
|
12
|
+
authFn: authClient.revokeSession,
|
|
13
|
+
options: {
|
|
14
|
+
...options,
|
|
15
|
+
onSuccess: async (...args) => {
|
|
16
|
+
await refetch();
|
|
17
|
+
await options?.onSuccess?.(...args);
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
});
|
|
21
|
+
}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { type AuthClient } from "@better-auth-ui/react";
|
|
2
|
+
import type { UseAuthMutationOptions } from "../auth/use-auth-mutation";
|
|
3
|
+
/**
|
|
4
|
+
* Hook that sets an active device session in multi-session mode.
|
|
5
|
+
*
|
|
6
|
+
* @returns The `useMutation` result.
|
|
7
|
+
*/
|
|
8
|
+
export declare function useSetActiveSession(options?: UseAuthMutationOptions<AuthClient["multiSession"]["setActive"]>): import("../auth/use-auth-mutation").UseAuthMutationResult<(<FetchOptions extends import("better-auth").ClientFetchOption<Partial<{
|
|
9
|
+
sessionToken: string;
|
|
10
|
+
}> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: import("better-auth").Prettify<{
|
|
11
|
+
sessionToken: string;
|
|
12
|
+
} & {
|
|
13
|
+
fetchOptions?: FetchOptions | undefined;
|
|
14
|
+
}>, data_1?: FetchOptions | undefined) => Promise<import("better-auth/react").BetterFetchResponse<{
|
|
15
|
+
session: {
|
|
16
|
+
id: string;
|
|
17
|
+
createdAt: Date;
|
|
18
|
+
updatedAt: Date;
|
|
19
|
+
userId: string;
|
|
20
|
+
expiresAt: Date;
|
|
21
|
+
token: string;
|
|
22
|
+
ipAddress?: string | null | undefined;
|
|
23
|
+
userAgent?: string | null | undefined;
|
|
24
|
+
} & Record<string, any>;
|
|
25
|
+
user: {
|
|
26
|
+
id: string;
|
|
27
|
+
createdAt: Date;
|
|
28
|
+
updatedAt: Date;
|
|
29
|
+
email: string;
|
|
30
|
+
emailVerified: boolean;
|
|
31
|
+
name: string;
|
|
32
|
+
image?: string | null | undefined;
|
|
33
|
+
} & Record<string, any>;
|
|
34
|
+
}, {
|
|
35
|
+
code?: string | undefined;
|
|
36
|
+
message?: string | undefined;
|
|
37
|
+
}, FetchOptions["throw"] extends true ? true : false>>)>;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { useAuth, useAuthMutation, useListDeviceSessions, useSession } from "@better-auth-ui/react";
|
|
2
|
+
import { useQueryClient } from "@tanstack/react-query";
|
|
3
|
+
/**
|
|
4
|
+
* Hook that sets an active device session in multi-session mode.
|
|
5
|
+
*
|
|
6
|
+
* @returns The `useMutation` result.
|
|
7
|
+
*/
|
|
8
|
+
export function useSetActiveSession(options) {
|
|
9
|
+
const queryClient = useQueryClient();
|
|
10
|
+
const { authClient } = useAuth();
|
|
11
|
+
const { refetch: refetchSession } = useSession({ refetchOnMount: false });
|
|
12
|
+
const { data: deviceSessions, refetch: refetchDeviceSessions } = useListDeviceSessions({ refetchOnMount: false });
|
|
13
|
+
return useAuthMutation({
|
|
14
|
+
authFn: authClient.multiSession.setActive,
|
|
15
|
+
options: {
|
|
16
|
+
...options,
|
|
17
|
+
onSuccess: async (data, { sessionToken }, ...args) => {
|
|
18
|
+
const deviceSession = deviceSessions?.find((session) => session.session.token === sessionToken);
|
|
19
|
+
if (deviceSession)
|
|
20
|
+
queryClient.setQueryData(["auth", "getSession"], deviceSession);
|
|
21
|
+
window.scrollTo({ top: 0 });
|
|
22
|
+
await refetchSession();
|
|
23
|
+
await refetchDeviceSessions();
|
|
24
|
+
await options?.onSuccess?.(data, { sessionToken }, ...args);
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
});
|
|
28
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { type AuthClient } from "@better-auth-ui/react";
|
|
2
|
+
import type { UseAuthMutationOptions } from "../auth/use-auth-mutation";
|
|
3
|
+
/**
|
|
4
|
+
* Hook that creates a mutation for unlinking a social provider from the current user.
|
|
5
|
+
*
|
|
6
|
+
* @returns The `useMutation` result.
|
|
7
|
+
*/
|
|
8
|
+
export declare function useUnlinkAccount(options?: UseAuthMutationOptions<AuthClient["unlinkAccount"]>): import("../auth/use-auth-mutation").UseAuthMutationResult<(<FetchOptions extends import("better-auth").ClientFetchOption<Partial<{
|
|
9
|
+
providerId: string;
|
|
10
|
+
accountId?: string | undefined;
|
|
11
|
+
}> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: import("better-auth").Prettify<{
|
|
12
|
+
providerId: string;
|
|
13
|
+
accountId?: string | undefined;
|
|
14
|
+
} & {
|
|
15
|
+
fetchOptions?: FetchOptions | undefined;
|
|
16
|
+
}>, data_1?: FetchOptions | undefined) => Promise<import("better-auth/react").BetterFetchResponse<{
|
|
17
|
+
status: boolean;
|
|
18
|
+
}, {
|
|
19
|
+
code?: string | undefined;
|
|
20
|
+
message?: string | undefined;
|
|
21
|
+
}, FetchOptions["throw"] extends true ? true : false>>)>;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { useAuth, useAuthMutation } from "@better-auth-ui/react";
|
|
2
|
+
import { useListAccounts } from "./use-list-accounts";
|
|
3
|
+
/**
|
|
4
|
+
* Hook that creates a mutation for unlinking a social provider from the current user.
|
|
5
|
+
*
|
|
6
|
+
* @returns The `useMutation` result.
|
|
7
|
+
*/
|
|
8
|
+
export function useUnlinkAccount(options) {
|
|
9
|
+
const { authClient } = useAuth();
|
|
10
|
+
const { refetch } = useListAccounts({ refetchOnMount: false });
|
|
11
|
+
return useAuthMutation({
|
|
12
|
+
authFn: authClient.unlinkAccount,
|
|
13
|
+
options: {
|
|
14
|
+
...options,
|
|
15
|
+
onSuccess: async (...args) => {
|
|
16
|
+
await refetch();
|
|
17
|
+
await options?.onSuccess?.(...args);
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
});
|
|
21
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { type AuthClient } from "@better-auth-ui/react";
|
|
2
|
+
import type { UseAuthMutationOptions, UseAuthMutationResult } from "../auth/use-auth-mutation";
|
|
3
|
+
/**
|
|
4
|
+
* Hook that creates a mutation for updating the authenticated user's profile.
|
|
5
|
+
*
|
|
6
|
+
* The mutation submits the name update, refetches the session on success,
|
|
7
|
+
* and displays success or error toasts.
|
|
8
|
+
*
|
|
9
|
+
* @returns The `useMutation` result.
|
|
10
|
+
*/
|
|
11
|
+
export declare function useUpdateUser(options?: UseAuthMutationOptions<AuthClient["updateUser"]>): UseAuthMutationResult<AuthClient["updateUser"]>;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { useAuth, useAuthMutation, useSession } from "@better-auth-ui/react";
|
|
2
|
+
import { useQueryClient } from "@tanstack/react-query";
|
|
3
|
+
/**
|
|
4
|
+
* Hook that creates a mutation for updating the authenticated user's profile.
|
|
5
|
+
*
|
|
6
|
+
* The mutation submits the name update, refetches the session on success,
|
|
7
|
+
* and displays success or error toasts.
|
|
8
|
+
*
|
|
9
|
+
* @returns The `useMutation` result.
|
|
10
|
+
*/
|
|
11
|
+
export function useUpdateUser(options) {
|
|
12
|
+
const { authClient } = useAuth();
|
|
13
|
+
const { data: session, refetch } = useSession({ refetchOnMount: false });
|
|
14
|
+
const queryClient = useQueryClient();
|
|
15
|
+
return useAuthMutation({
|
|
16
|
+
authFn: authClient.updateUser,
|
|
17
|
+
options: {
|
|
18
|
+
...options,
|
|
19
|
+
onSuccess: async (data, variables, ...rest) => {
|
|
20
|
+
queryClient.setQueryData(["auth", "getSession"], {
|
|
21
|
+
...session,
|
|
22
|
+
user: { ...session?.user, ...variables }
|
|
23
|
+
});
|
|
24
|
+
refetch();
|
|
25
|
+
await options?.onSuccess?.(data, variables, ...rest);
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
});
|
|
29
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { useSyncExternalStore } from "react";
|
|
3
|
+
/**
|
|
4
|
+
* Indicates whether the current rendering context is hydrated (client-side).
|
|
5
|
+
*
|
|
6
|
+
* @returns `true` when running on the client (hydrated), `false` when rendering on the server
|
|
7
|
+
*/
|
|
8
|
+
export function useHydrated() {
|
|
9
|
+
return useSyncExternalStore(subscribe, () => true, () => false);
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* Create a subscription handler that does nothing and returns a no-op cleanup.
|
|
13
|
+
*
|
|
14
|
+
* @returns A cleanup function that performs no action when invoked.
|
|
15
|
+
*/
|
|
16
|
+
function subscribe() {
|
|
17
|
+
return () => { };
|
|
18
|
+
}
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
export * from "./components/auth/auth-provider";
|
|
2
|
+
export * from "./components/email";
|
|
3
|
+
export * from "./components/icons";
|
|
4
|
+
export * from "./components/settings/account/theme-preview";
|
|
5
|
+
export * from "./hooks/auth/use-authenticate";
|
|
6
|
+
export * from "./hooks/auth/use-request-password-reset";
|
|
7
|
+
export * from "./hooks/auth/use-reset-password";
|
|
8
|
+
export * from "./hooks/auth/use-send-verification-email";
|
|
9
|
+
export * from "./hooks/auth/use-session";
|
|
10
|
+
export * from "./hooks/auth/use-sign-in-email";
|
|
11
|
+
export * from "./hooks/auth/use-sign-in-magic-link";
|
|
12
|
+
export * from "./hooks/auth/use-sign-in-social";
|
|
13
|
+
export * from "./hooks/auth/use-sign-out";
|
|
14
|
+
export * from "./hooks/auth/use-sign-up-email";
|
|
15
|
+
export * from "./hooks/auth/use-user";
|
|
16
|
+
export * from "./hooks/settings/use-account-info";
|
|
17
|
+
export * from "./hooks/settings/use-change-email";
|
|
18
|
+
export * from "./hooks/settings/use-change-password";
|
|
19
|
+
export * from "./hooks/settings/use-delete-user";
|
|
20
|
+
export * from "./hooks/settings/use-link-social";
|
|
21
|
+
export * from "./hooks/settings/use-list-accounts";
|
|
22
|
+
export * from "./hooks/settings/use-list-device-sessions";
|
|
23
|
+
export * from "./hooks/settings/use-list-sessions";
|
|
24
|
+
export * from "./hooks/settings/use-revoke-multi-session";
|
|
25
|
+
export * from "./hooks/settings/use-revoke-session";
|
|
26
|
+
export * from "./hooks/settings/use-set-active-session";
|
|
27
|
+
export * from "./hooks/settings/use-unlink-account";
|
|
28
|
+
export * from "./hooks/settings/use-update-user";
|
|
29
|
+
export * from "./lib/auth-client";
|
|
30
|
+
export * from "./lib/auth-config";
|
|
31
|
+
export * from "./lib/auth-context";
|
|
32
|
+
export * from "./lib/provider-icons";
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
export * from "./components/auth/auth-provider";
|
|
3
|
+
export * from "./components/email";
|
|
4
|
+
export * from "./components/icons";
|
|
5
|
+
export * from "./components/settings/account/theme-preview";
|
|
6
|
+
export * from "./hooks/auth/use-authenticate";
|
|
7
|
+
export * from "./hooks/auth/use-request-password-reset";
|
|
8
|
+
export * from "./hooks/auth/use-reset-password";
|
|
9
|
+
export * from "./hooks/auth/use-send-verification-email";
|
|
10
|
+
export * from "./hooks/auth/use-session";
|
|
11
|
+
export * from "./hooks/auth/use-sign-in-email";
|
|
12
|
+
export * from "./hooks/auth/use-sign-in-magic-link";
|
|
13
|
+
export * from "./hooks/auth/use-sign-in-social";
|
|
14
|
+
export * from "./hooks/auth/use-sign-out";
|
|
15
|
+
export * from "./hooks/auth/use-sign-up-email";
|
|
16
|
+
export * from "./hooks/auth/use-user";
|
|
17
|
+
export * from "./hooks/settings/use-account-info";
|
|
18
|
+
export * from "./hooks/settings/use-change-email";
|
|
19
|
+
export * from "./hooks/settings/use-change-password";
|
|
20
|
+
export * from "./hooks/settings/use-delete-user";
|
|
21
|
+
export * from "./hooks/settings/use-link-social";
|
|
22
|
+
export * from "./hooks/settings/use-list-accounts";
|
|
23
|
+
export * from "./hooks/settings/use-list-device-sessions";
|
|
24
|
+
export * from "./hooks/settings/use-list-sessions";
|
|
25
|
+
export * from "./hooks/settings/use-revoke-multi-session";
|
|
26
|
+
export * from "./hooks/settings/use-revoke-session";
|
|
27
|
+
export * from "./hooks/settings/use-set-active-session";
|
|
28
|
+
export * from "./hooks/settings/use-unlink-account";
|
|
29
|
+
export * from "./hooks/settings/use-update-user";
|
|
30
|
+
export * from "./lib/auth-client";
|
|
31
|
+
export * from "./lib/auth-config";
|
|
32
|
+
export * from "./lib/auth-context";
|
|
33
|
+
export * from "./lib/provider-icons";
|