payload-auth 1.0.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/LICENSE.md +17 -0
- package/dist/authjs/index.d.ts +1 -0
- package/dist/authjs/index.js +3 -0
- package/dist/authjs/index.js.map +1 -0
- package/dist/better-auth/adapter/dev/bin/run.d.ts +1 -0
- package/dist/better-auth/adapter/dev/bin/run.js +64 -0
- package/dist/better-auth/adapter/dev/bin/run.js.map +1 -0
- package/dist/better-auth/adapter/dev/bin/schema.d.ts +22 -0
- package/dist/better-auth/adapter/dev/bin/schema.js +160 -0
- package/dist/better-auth/adapter/dev/bin/schema.js.map +1 -0
- package/dist/better-auth/adapter/dev/collections.d.ts +3 -0
- package/dist/better-auth/adapter/dev/collections.js +212 -0
- package/dist/better-auth/adapter/dev/collections.js.map +1 -0
- package/dist/better-auth/adapter/dev/index.d.ts +3 -0
- package/dist/better-auth/adapter/dev/index.js +168 -0
- package/dist/better-auth/adapter/dev/index.js.map +1 -0
- package/dist/better-auth/adapter/generate-schema/generate-schema-builder.d.ts +23 -0
- package/dist/better-auth/adapter/generate-schema/generate-schema-builder.js +326 -0
- package/dist/better-auth/adapter/generate-schema/generate-schema-builder.js.map +1 -0
- package/dist/better-auth/adapter/generate-schema/get-payload-schema.d.ts +1 -0
- package/dist/better-auth/adapter/generate-schema/get-payload-schema.js +23 -0
- package/dist/better-auth/adapter/generate-schema/get-payload-schema.js.map +1 -0
- package/dist/better-auth/adapter/generate-schema/index.d.ts +4 -0
- package/dist/better-auth/adapter/generate-schema/index.js +19 -0
- package/dist/better-auth/adapter/generate-schema/index.js.map +1 -0
- package/dist/better-auth/adapter/generate-schema/utils.d.ts +2 -0
- package/dist/better-auth/adapter/generate-schema/utils.js +20 -0
- package/dist/better-auth/adapter/generate-schema/utils.js.map +1 -0
- package/dist/better-auth/adapter/index.d.ts +5 -0
- package/dist/better-auth/adapter/index.js +578 -0
- package/dist/better-auth/adapter/index.js.map +1 -0
- package/dist/better-auth/adapter/test/adapter.test.d.ts +1 -0
- package/dist/better-auth/adapter/test/adapter.test.js +181 -0
- package/dist/better-auth/adapter/test/adapter.test.js.map +1 -0
- package/dist/better-auth/adapter/test/better-auth-adapter-test.d.ts +7 -0
- package/dist/better-auth/adapter/test/better-auth-adapter-test.js +425 -0
- package/dist/better-auth/adapter/test/better-auth-adapter-test.js.map +1 -0
- package/dist/better-auth/adapter/test/schema.test.d.ts +1 -0
- package/dist/better-auth/adapter/test/schema.test.js +796 -0
- package/dist/better-auth/adapter/test/schema.test.js.map +1 -0
- package/dist/better-auth/adapter/test/test_payload1/schema.d.ts +23 -0
- package/dist/better-auth/adapter/test/test_payload1/schema.js +177 -0
- package/dist/better-auth/adapter/test/test_payload1/schema.js.map +1 -0
- package/dist/better-auth/adapter/test/test_payload2/schema.d.ts +23 -0
- package/dist/better-auth/adapter/test/test_payload2/schema.js +167 -0
- package/dist/better-auth/adapter/test/test_payload2/schema.js.map +1 -0
- package/dist/better-auth/adapter/test/test_payload3/schema.d.ts +23 -0
- package/dist/better-auth/adapter/test/test_payload3/schema.js +198 -0
- package/dist/better-auth/adapter/test/test_payload3/schema.js.map +1 -0
- package/dist/better-auth/adapter/transform/index.d.ts +16 -0
- package/dist/better-auth/adapter/transform/index.js +252 -0
- package/dist/better-auth/adapter/transform/index.js.map +1 -0
- package/dist/better-auth/adapter/types.d.ts +6 -0
- package/dist/better-auth/adapter/types.js +3 -0
- package/dist/better-auth/adapter/types.js.map +1 -0
- package/dist/better-auth/index.d.ts +6 -0
- package/dist/better-auth/index.js +8 -0
- package/dist/better-auth/index.js.map +1 -0
- package/dist/better-auth/plugin/collections/accounts/hooks/sync-password-to-user.d.ts +7 -0
- package/dist/better-auth/plugin/collections/accounts/hooks/sync-password-to-user.js +47 -0
- package/dist/better-auth/plugin/collections/accounts/hooks/sync-password-to-user.js.map +1 -0
- package/dist/better-auth/plugin/collections/users/endpoints/refresh-token.d.ts +6 -0
- package/dist/better-auth/plugin/collections/users/endpoints/refresh-token.js +106 -0
- package/dist/better-auth/plugin/collections/users/endpoints/refresh-token.js.map +1 -0
- package/dist/better-auth/plugin/collections/users/hooks/after-login.d.ts +11 -0
- package/dist/better-auth/plugin/collections/users/hooks/after-login.js +71 -0
- package/dist/better-auth/plugin/collections/users/hooks/after-login.js.map +1 -0
- package/dist/better-auth/plugin/collections/users/hooks/after-logout.d.ts +6 -0
- package/dist/better-auth/plugin/collections/users/hooks/after-logout.js +49 -0
- package/dist/better-auth/plugin/collections/users/hooks/after-logout.js.map +1 -0
- package/dist/better-auth/plugin/collections/users/hooks/before-login.d.ts +5 -0
- package/dist/better-auth/plugin/collections/users/hooks/before-login.js +18 -0
- package/dist/better-auth/plugin/collections/users/hooks/before-login.js.map +1 -0
- package/dist/better-auth/plugin/collections/users/hooks/clean-up-user-after-delete.d.ts +5 -0
- package/dist/better-auth/plugin/collections/users/hooks/clean-up-user-after-delete.js +33 -0
- package/dist/better-auth/plugin/collections/users/hooks/clean-up-user-after-delete.js.map +1 -0
- package/dist/better-auth/plugin/collections/users/hooks/on-verified-change.d.ts +2 -0
- package/dist/better-auth/plugin/collections/users/hooks/on-verified-change.js +14 -0
- package/dist/better-auth/plugin/collections/users/hooks/on-verified-change.js.map +1 -0
- package/dist/better-auth/plugin/collections/users/hooks/sync-account.d.ts +7 -0
- package/dist/better-auth/plugin/collections/users/hooks/sync-account.js +82 -0
- package/dist/better-auth/plugin/collections/users/hooks/sync-account.js.map +1 -0
- package/dist/better-auth/plugin/helpers/generate-verify-email-url.d.ts +29 -0
- package/dist/better-auth/plugin/helpers/generate-verify-email-url.js +46 -0
- package/dist/better-auth/plugin/helpers/generate-verify-email-url.js.map +1 -0
- package/dist/better-auth/plugin/helpers/get-ip.d.ts +2 -0
- package/dist/better-auth/plugin/helpers/get-ip.js +31 -0
- package/dist/better-auth/plugin/helpers/get-ip.js.map +1 -0
- package/dist/better-auth/plugin/helpers/index.d.ts +1 -0
- package/dist/better-auth/plugin/helpers/index.js +3 -0
- package/dist/better-auth/plugin/helpers/index.js.map +1 -0
- package/dist/better-auth/plugin/helpers/serialize-cookie.d.ts +104 -0
- package/dist/better-auth/plugin/helpers/serialize-cookie.js +186 -0
- package/dist/better-auth/plugin/helpers/serialize-cookie.js.map +1 -0
- package/dist/better-auth/plugin/index.d.ts +7 -0
- package/dist/better-auth/plugin/index.js +64 -0
- package/dist/better-auth/plugin/index.js.map +1 -0
- package/dist/better-auth/plugin/lib/auth-strategy.d.ts +8 -0
- package/dist/better-auth/plugin/lib/auth-strategy.js +48 -0
- package/dist/better-auth/plugin/lib/auth-strategy.js.map +1 -0
- package/dist/better-auth/plugin/lib/build-collection-configs.d.ts +11 -0
- package/dist/better-auth/plugin/lib/build-collection-configs.js +1558 -0
- package/dist/better-auth/plugin/lib/build-collection-configs.js.map +1 -0
- package/dist/better-auth/plugin/lib/config.d.ts +41 -0
- package/dist/better-auth/plugin/lib/config.js +43 -0
- package/dist/better-auth/plugin/lib/config.js.map +1 -0
- package/dist/better-auth/plugin/lib/ensure-password-set-before-create.d.ts +7 -0
- package/dist/better-auth/plugin/lib/ensure-password-set-before-create.js +24 -0
- package/dist/better-auth/plugin/lib/ensure-password-set-before-create.js.map +1 -0
- package/dist/better-auth/plugin/lib/get-payload-auth.d.ts +5 -0
- package/dist/better-auth/plugin/lib/get-payload-auth.js +9 -0
- package/dist/better-auth/plugin/lib/get-payload-auth.js.map +1 -0
- package/dist/better-auth/plugin/lib/get-required-collection-slugs.d.ts +9 -0
- package/dist/better-auth/plugin/lib/get-required-collection-slugs.js +52 -0
- package/dist/better-auth/plugin/lib/get-required-collection-slugs.js.map +1 -0
- package/dist/better-auth/plugin/lib/init-better-auth.d.ts +6 -0
- package/dist/better-auth/plugin/lib/init-better-auth.js +13 -0
- package/dist/better-auth/plugin/lib/init-better-auth.js.map +1 -0
- package/dist/better-auth/plugin/lib/password.d.ts +25 -0
- package/dist/better-auth/plugin/lib/password.js +63 -0
- package/dist/better-auth/plugin/lib/password.js.map +1 -0
- package/dist/better-auth/plugin/lib/payload-access.d.ts +14 -0
- package/dist/better-auth/plugin/lib/payload-access.js +64 -0
- package/dist/better-auth/plugin/lib/payload-access.js.map +1 -0
- package/dist/better-auth/plugin/lib/prepare-session-data.d.ts +21 -0
- package/dist/better-auth/plugin/lib/prepare-session-data.js +42 -0
- package/dist/better-auth/plugin/lib/prepare-session-data.js.map +1 -0
- package/dist/better-auth/plugin/lib/respect-save-to-jwt-fields-middleware.d.ts +15 -0
- package/dist/better-auth/plugin/lib/respect-save-to-jwt-fields-middleware.js +30 -0
- package/dist/better-auth/plugin/lib/respect-save-to-jwt-fields-middleware.js.map +1 -0
- package/dist/better-auth/plugin/lib/sanitize-auth-options.d.ts +5 -0
- package/dist/better-auth/plugin/lib/sanitize-auth-options.js +298 -0
- package/dist/better-auth/plugin/lib/sanitize-auth-options.js.map +1 -0
- package/dist/better-auth/plugin/payload/components/admin-buttons.d.ts +5 -0
- package/dist/better-auth/plugin/payload/components/admin-buttons.js +222 -0
- package/dist/better-auth/plugin/payload/components/admin-buttons.js.map +1 -0
- package/dist/better-auth/plugin/payload/components/login-redirect.d.ts +1 -0
- package/dist/better-auth/plugin/payload/components/login-redirect.js +6 -0
- package/dist/better-auth/plugin/payload/components/login-redirect.js.map +1 -0
- package/dist/better-auth/plugin/payload/components/logo.d.ts +1 -0
- package/dist/better-auth/plugin/payload/components/logo.js +36 -0
- package/dist/better-auth/plugin/payload/components/logo.js.map +1 -0
- package/dist/better-auth/plugin/payload/components/logout.d.ts +1 -0
- package/dist/better-auth/plugin/payload/components/logout.js +61 -0
- package/dist/better-auth/plugin/payload/components/logout.js.map +1 -0
- package/dist/better-auth/plugin/payload/components/sign-in.d.ts +3 -0
- package/dist/better-auth/plugin/payload/components/sign-in.js +384 -0
- package/dist/better-auth/plugin/payload/components/sign-in.js.map +1 -0
- package/dist/better-auth/plugin/payload/components/sign-up.d.ts +6 -0
- package/dist/better-auth/plugin/payload/components/sign-up.js +502 -0
- package/dist/better-auth/plugin/payload/components/sign-up.js.map +1 -0
- package/dist/better-auth/plugin/payload/components/styles.css +73 -0
- package/dist/better-auth/plugin/payload/components/ui/button.d.ts +10 -0
- package/dist/better-auth/plugin/payload/components/ui/button.js +42 -0
- package/dist/better-auth/plugin/payload/components/ui/button.js.map +1 -0
- package/dist/better-auth/plugin/payload/components/ui/card.d.ts +9 -0
- package/dist/better-auth/plugin/payload/components/ui/card.js +55 -0
- package/dist/better-auth/plugin/payload/components/ui/card.js.map +1 -0
- package/dist/better-auth/plugin/payload/components/ui/checkbox.d.ts +4 -0
- package/dist/better-auth/plugin/payload/components/ui/checkbox.js +23 -0
- package/dist/better-auth/plugin/payload/components/ui/checkbox.js.map +1 -0
- package/dist/better-auth/plugin/payload/components/ui/cn.d.ts +2 -0
- package/dist/better-auth/plugin/payload/components/ui/cn.js +7 -0
- package/dist/better-auth/plugin/payload/components/ui/cn.js.map +1 -0
- package/dist/better-auth/plugin/payload/components/ui/input.d.ts +3 -0
- package/dist/better-auth/plugin/payload/components/ui/input.js +14 -0
- package/dist/better-auth/plugin/payload/components/ui/input.js.map +1 -0
- package/dist/better-auth/plugin/payload/components/ui/label.d.ts +4 -0
- package/dist/better-auth/plugin/payload/components/ui/label.js +15 -0
- package/dist/better-auth/plugin/payload/components/ui/label.js.map +1 -0
- package/dist/better-auth/plugin/payload/components/ui/password-input.d.ts +2 -0
- package/dist/better-auth/plugin/payload/components/ui/password-input.js +55 -0
- package/dist/better-auth/plugin/payload/components/ui/password-input.js.map +1 -0
- package/dist/better-auth/plugin/payload/exports/client.d.ts +3 -0
- package/dist/better-auth/plugin/payload/exports/client.js +5 -0
- package/dist/better-auth/plugin/payload/exports/client.js.map +1 -0
- package/dist/better-auth/plugin/payload/exports/rsc.d.ts +5 -0
- package/dist/better-auth/plugin/payload/exports/rsc.js +7 -0
- package/dist/better-auth/plugin/payload/exports/rsc.js.map +1 -0
- package/dist/better-auth/plugin/payload/views/create-first-admin/index.d.ts +4 -0
- package/dist/better-auth/plugin/payload/views/create-first-admin/index.js +112 -0
- package/dist/better-auth/plugin/payload/views/create-first-admin/index.js.map +1 -0
- package/dist/better-auth/plugin/payload/views/login/index.d.ts +4 -0
- package/dist/better-auth/plugin/payload/views/login/index.js +78 -0
- package/dist/better-auth/plugin/payload/views/login/index.js.map +1 -0
- package/dist/better-auth/plugin/types.d.ts +224 -0
- package/dist/better-auth/plugin/types.js +3 -0
- package/dist/better-auth/plugin/types.js.map +1 -0
- package/dist/better-auth/types.d.ts +2 -0
- package/dist/better-auth/types.js +4 -0
- package/dist/better-auth/types.js.map +1 -0
- package/dist/clerk/index.d.ts +1 -0
- package/dist/clerk/index.js +3 -0
- package/dist/clerk/index.js.map +1 -0
- package/dist/index.js +7 -0
- package/dist/index.js.map +1 -0
- package/dist/kinde/index.d.ts +1 -0
- package/dist/kinde/index.js +3 -0
- package/dist/kinde/index.js.map +1 -0
- package/package.json +87 -0
|
@@ -0,0 +1,384 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { createAuthClient } from 'better-auth/react';
|
|
4
|
+
import { Button } from './ui/button';
|
|
5
|
+
import { Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle } from './ui/card';
|
|
6
|
+
import { Checkbox } from './ui/checkbox';
|
|
7
|
+
import { Input } from './ui/input';
|
|
8
|
+
import { Label } from './ui/label';
|
|
9
|
+
import { PasswordInput } from './ui/password-input';
|
|
10
|
+
import { DiscordLogoIcon, GitHubLogoIcon } from '@radix-ui/react-icons';
|
|
11
|
+
import { Key, Loader2 } from 'lucide-react';
|
|
12
|
+
import Link from 'next/link';
|
|
13
|
+
import { useRouter } from 'next/navigation';
|
|
14
|
+
import { useState } from 'react';
|
|
15
|
+
import { toast } from 'sonner';
|
|
16
|
+
import { passkeyClient } from 'better-auth/client/plugins';
|
|
17
|
+
export default function SignIn({ admin = false }) {
|
|
18
|
+
const [email, setEmail] = useState('');
|
|
19
|
+
const [password, setPassword] = useState('');
|
|
20
|
+
const [rememberMe, setRememberMe] = useState(false);
|
|
21
|
+
const router = useRouter();
|
|
22
|
+
const [loading, setLoading] = useState(false);
|
|
23
|
+
const authClient = createAuthClient({
|
|
24
|
+
plugins: [
|
|
25
|
+
passkeyClient()
|
|
26
|
+
]
|
|
27
|
+
});
|
|
28
|
+
return /*#__PURE__*/ _jsxs(Card, {
|
|
29
|
+
className: "z-50 rounded-md rounded-t-none w-full max-w-md shadow-lg",
|
|
30
|
+
children: [
|
|
31
|
+
/*#__PURE__*/ _jsxs(CardHeader, {
|
|
32
|
+
className: "space-y-1",
|
|
33
|
+
children: [
|
|
34
|
+
/*#__PURE__*/ _jsx(CardTitle, {
|
|
35
|
+
className: "text-xl md:text-2xl font-bold",
|
|
36
|
+
children: "Sign In"
|
|
37
|
+
}),
|
|
38
|
+
/*#__PURE__*/ _jsx(CardDescription, {
|
|
39
|
+
className: "text-sm text-muted-foreground",
|
|
40
|
+
children: admin ? 'Enter your credentials to access the admin dashboard' : 'Enter your credentials to access your account'
|
|
41
|
+
})
|
|
42
|
+
]
|
|
43
|
+
}),
|
|
44
|
+
/*#__PURE__*/ _jsx(CardContent, {
|
|
45
|
+
className: "space-y-4",
|
|
46
|
+
children: /*#__PURE__*/ _jsxs("div", {
|
|
47
|
+
className: "space-y-4",
|
|
48
|
+
children: [
|
|
49
|
+
/*#__PURE__*/ _jsxs("div", {
|
|
50
|
+
className: "space-y-2",
|
|
51
|
+
children: [
|
|
52
|
+
/*#__PURE__*/ _jsx(Label, {
|
|
53
|
+
htmlFor: "email",
|
|
54
|
+
className: "text-sm font-medium",
|
|
55
|
+
children: "Email"
|
|
56
|
+
}),
|
|
57
|
+
/*#__PURE__*/ _jsx(Input, {
|
|
58
|
+
id: "email",
|
|
59
|
+
type: "email",
|
|
60
|
+
placeholder: "m@example.com",
|
|
61
|
+
required: true,
|
|
62
|
+
onChange: (e)=>{
|
|
63
|
+
setEmail(e.target.value);
|
|
64
|
+
},
|
|
65
|
+
value: email,
|
|
66
|
+
className: "w-full"
|
|
67
|
+
})
|
|
68
|
+
]
|
|
69
|
+
}),
|
|
70
|
+
/*#__PURE__*/ _jsxs("div", {
|
|
71
|
+
className: "space-y-2",
|
|
72
|
+
children: [
|
|
73
|
+
/*#__PURE__*/ _jsxs("div", {
|
|
74
|
+
className: "flex items-center justify-between",
|
|
75
|
+
children: [
|
|
76
|
+
/*#__PURE__*/ _jsx(Label, {
|
|
77
|
+
htmlFor: "password",
|
|
78
|
+
className: "text-sm font-medium",
|
|
79
|
+
children: "Password"
|
|
80
|
+
}),
|
|
81
|
+
/*#__PURE__*/ _jsx(Link, {
|
|
82
|
+
href: "/forget-password",
|
|
83
|
+
className: "text-xs text-primary hover:underline",
|
|
84
|
+
children: "Forgot password?"
|
|
85
|
+
})
|
|
86
|
+
]
|
|
87
|
+
}),
|
|
88
|
+
/*#__PURE__*/ _jsx(PasswordInput, {
|
|
89
|
+
id: "password",
|
|
90
|
+
value: password,
|
|
91
|
+
onChange: (e)=>setPassword(e.target.value),
|
|
92
|
+
autoComplete: "password",
|
|
93
|
+
placeholder: "Password",
|
|
94
|
+
className: "w-full"
|
|
95
|
+
})
|
|
96
|
+
]
|
|
97
|
+
}),
|
|
98
|
+
!admin && /*#__PURE__*/ _jsxs("div", {
|
|
99
|
+
className: "flex items-center gap-2",
|
|
100
|
+
children: [
|
|
101
|
+
/*#__PURE__*/ _jsx(Checkbox, {
|
|
102
|
+
id: "remember",
|
|
103
|
+
onClick: ()=>{
|
|
104
|
+
setRememberMe(!rememberMe);
|
|
105
|
+
}
|
|
106
|
+
}),
|
|
107
|
+
/*#__PURE__*/ _jsx(Label, {
|
|
108
|
+
htmlFor: "remember",
|
|
109
|
+
className: "text-sm",
|
|
110
|
+
children: "Remember me"
|
|
111
|
+
})
|
|
112
|
+
]
|
|
113
|
+
}),
|
|
114
|
+
/*#__PURE__*/ _jsxs(Button, {
|
|
115
|
+
type: "submit",
|
|
116
|
+
className: "w-full",
|
|
117
|
+
variant: "outline",
|
|
118
|
+
disabled: loading,
|
|
119
|
+
onClick: async ()=>{
|
|
120
|
+
await authClient.signIn.email({
|
|
121
|
+
email: email,
|
|
122
|
+
password: password,
|
|
123
|
+
callbackURL: admin ? '/admin' : '/dashboard',
|
|
124
|
+
rememberMe,
|
|
125
|
+
fetchOptions: {
|
|
126
|
+
onRequest: ()=>{
|
|
127
|
+
setLoading(true);
|
|
128
|
+
},
|
|
129
|
+
onResponse: ()=>{
|
|
130
|
+
setLoading(false);
|
|
131
|
+
},
|
|
132
|
+
onError: (ctx)=>{
|
|
133
|
+
toast.error(ctx.error.message);
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
});
|
|
137
|
+
},
|
|
138
|
+
children: [
|
|
139
|
+
loading ? /*#__PURE__*/ _jsx(Loader2, {
|
|
140
|
+
size: 16,
|
|
141
|
+
className: "animate-spin mr-2"
|
|
142
|
+
}) : null,
|
|
143
|
+
loading ? 'Signing in...' : 'Sign in'
|
|
144
|
+
]
|
|
145
|
+
}),
|
|
146
|
+
!admin && /*#__PURE__*/ _jsxs("div", {
|
|
147
|
+
children: [
|
|
148
|
+
/*#__PURE__*/ _jsx("div", {
|
|
149
|
+
className: "relative my-4",
|
|
150
|
+
children: /*#__PURE__*/ _jsx("div", {
|
|
151
|
+
className: "relative flex justify-center text-xs uppercase border-b border-muted pb-4",
|
|
152
|
+
children: /*#__PURE__*/ _jsx("span", {
|
|
153
|
+
className: "bg-card px-2 text-muted-foreground",
|
|
154
|
+
children: "Or continue with"
|
|
155
|
+
})
|
|
156
|
+
})
|
|
157
|
+
}),
|
|
158
|
+
/*#__PURE__*/ _jsxs("div", {
|
|
159
|
+
className: "grid grid-cols-4 gap-2 sm:grid-cols-7",
|
|
160
|
+
children: [
|
|
161
|
+
/*#__PURE__*/ _jsx(Button, {
|
|
162
|
+
variant: "outline",
|
|
163
|
+
size: "icon",
|
|
164
|
+
className: "h-10 w-10",
|
|
165
|
+
onClick: async ()=>{
|
|
166
|
+
await authClient.signIn.social({
|
|
167
|
+
provider: 'github',
|
|
168
|
+
callbackURL: '/dashboard'
|
|
169
|
+
});
|
|
170
|
+
},
|
|
171
|
+
title: "GitHub",
|
|
172
|
+
children: /*#__PURE__*/ _jsx(GitHubLogoIcon, {
|
|
173
|
+
className: "h-4 w-4"
|
|
174
|
+
})
|
|
175
|
+
}),
|
|
176
|
+
/*#__PURE__*/ _jsx(Button, {
|
|
177
|
+
variant: "outline",
|
|
178
|
+
size: "icon",
|
|
179
|
+
className: "h-10 w-10",
|
|
180
|
+
onClick: async ()=>{
|
|
181
|
+
await authClient.signIn.social({
|
|
182
|
+
provider: 'discord',
|
|
183
|
+
callbackURL: '/dashboard'
|
|
184
|
+
});
|
|
185
|
+
},
|
|
186
|
+
title: "Discord",
|
|
187
|
+
children: /*#__PURE__*/ _jsx(DiscordLogoIcon, {
|
|
188
|
+
className: "h-4 w-4"
|
|
189
|
+
})
|
|
190
|
+
}),
|
|
191
|
+
/*#__PURE__*/ _jsx(Button, {
|
|
192
|
+
variant: "outline",
|
|
193
|
+
size: "icon",
|
|
194
|
+
className: "h-10 w-10",
|
|
195
|
+
onClick: async ()=>{
|
|
196
|
+
await authClient.signIn.social({
|
|
197
|
+
provider: 'google',
|
|
198
|
+
callbackURL: '/dashboard'
|
|
199
|
+
});
|
|
200
|
+
},
|
|
201
|
+
title: "Google",
|
|
202
|
+
children: /*#__PURE__*/ _jsxs("svg", {
|
|
203
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
204
|
+
width: "16",
|
|
205
|
+
height: "16",
|
|
206
|
+
viewBox: "0 0 256 262",
|
|
207
|
+
children: [
|
|
208
|
+
/*#__PURE__*/ _jsx("path", {
|
|
209
|
+
fill: "#4285F4",
|
|
210
|
+
d: "M255.878 133.451c0-10.734-.871-18.567-2.756-26.69H130.55v48.448h71.947c-1.45 12.04-9.283 30.172-26.69 42.356l-.244 1.622l38.755 30.023l2.685.268c24.659-22.774 38.875-56.282 38.875-96.027"
|
|
211
|
+
}),
|
|
212
|
+
/*#__PURE__*/ _jsx("path", {
|
|
213
|
+
fill: "#34A853",
|
|
214
|
+
d: "M130.55 261.1c35.248 0 64.839-11.605 86.453-31.622l-41.196-31.913c-11.024 7.688-25.82 13.055-45.257 13.055c-34.523 0-63.824-22.773-74.269-54.25l-1.531.13l-40.298 31.187l-.527 1.465C35.393 231.798 79.49 261.1 130.55 261.1"
|
|
215
|
+
}),
|
|
216
|
+
/*#__PURE__*/ _jsx("path", {
|
|
217
|
+
fill: "#FBBC05",
|
|
218
|
+
d: "M56.281 156.37c-2.756-8.123-4.351-16.827-4.351-25.82c0-8.994 1.595-17.697 4.206-25.82l-.073-1.73L15.26 71.312l-1.335.635C5.077 89.644 0 109.517 0 130.55s5.077 40.905 13.925 58.602z"
|
|
219
|
+
}),
|
|
220
|
+
/*#__PURE__*/ _jsx("path", {
|
|
221
|
+
fill: "#EB4335",
|
|
222
|
+
d: "M130.55 50.479c24.514 0 41.05 10.589 50.479 19.438l36.844-35.974C195.245 12.91 165.798 0 130.55 0C79.49 0 35.393 29.301 13.925 71.947l42.211 32.783c10.59-31.477 39.891-54.251 74.414-54.251"
|
|
223
|
+
})
|
|
224
|
+
]
|
|
225
|
+
})
|
|
226
|
+
}),
|
|
227
|
+
/*#__PURE__*/ _jsx(Button, {
|
|
228
|
+
variant: "outline",
|
|
229
|
+
size: "icon",
|
|
230
|
+
className: "h-10 w-10",
|
|
231
|
+
onClick: async ()=>{
|
|
232
|
+
const { data } = await authClient.signIn.social({
|
|
233
|
+
provider: 'microsoft',
|
|
234
|
+
callbackURL: '/dashboard'
|
|
235
|
+
});
|
|
236
|
+
},
|
|
237
|
+
title: "Microsoft",
|
|
238
|
+
children: /*#__PURE__*/ _jsx("svg", {
|
|
239
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
240
|
+
width: "16",
|
|
241
|
+
height: "16",
|
|
242
|
+
viewBox: "0 0 24 24",
|
|
243
|
+
children: /*#__PURE__*/ _jsx("path", {
|
|
244
|
+
fill: "currentColor",
|
|
245
|
+
d: "M2 3h9v9H2zm9 19H2v-9h9zM21 3v9h-9V3zm0 19h-9v-9h9z"
|
|
246
|
+
})
|
|
247
|
+
})
|
|
248
|
+
}),
|
|
249
|
+
/*#__PURE__*/ _jsx(Button, {
|
|
250
|
+
variant: "outline",
|
|
251
|
+
size: "icon",
|
|
252
|
+
className: "h-10 w-10",
|
|
253
|
+
onClick: async ()=>{
|
|
254
|
+
await authClient.signIn.social({
|
|
255
|
+
provider: 'twitch',
|
|
256
|
+
callbackURL: '/dashboard'
|
|
257
|
+
});
|
|
258
|
+
},
|
|
259
|
+
title: "Twitch",
|
|
260
|
+
children: /*#__PURE__*/ _jsx("svg", {
|
|
261
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
262
|
+
width: "16",
|
|
263
|
+
height: "16",
|
|
264
|
+
viewBox: "0 0 24 24",
|
|
265
|
+
children: /*#__PURE__*/ _jsx("path", {
|
|
266
|
+
fill: "currentColor",
|
|
267
|
+
d: "M11.64 5.93h1.43v4.28h-1.43m3.93-4.28H17v4.28h-1.43M7 2L3.43 5.57v12.86h4.28V22l3.58-3.57h2.85L20.57 12V2m-1.43 9.29l-2.85 2.85h-2.86l-2.5 2.5v-2.5H7.71V3.43h11.43Z"
|
|
268
|
+
})
|
|
269
|
+
})
|
|
270
|
+
}),
|
|
271
|
+
/*#__PURE__*/ _jsx(Button, {
|
|
272
|
+
variant: "outline",
|
|
273
|
+
size: "icon",
|
|
274
|
+
className: "h-10 w-10",
|
|
275
|
+
onClick: async ()=>{
|
|
276
|
+
await authClient.signIn.social({
|
|
277
|
+
provider: 'facebook',
|
|
278
|
+
callbackURL: '/dashboard'
|
|
279
|
+
});
|
|
280
|
+
},
|
|
281
|
+
title: "Facebook",
|
|
282
|
+
children: /*#__PURE__*/ _jsx("svg", {
|
|
283
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
284
|
+
width: "16",
|
|
285
|
+
height: "16",
|
|
286
|
+
viewBox: "0 0 24 24",
|
|
287
|
+
children: /*#__PURE__*/ _jsx("path", {
|
|
288
|
+
fill: "currentColor",
|
|
289
|
+
d: "M22 12c0-5.52-4.48-10-10-10S2 6.48 2 12c0 4.84 3.44 8.87 8 9.8V15H8v-3h2V9.5C10 7.57 11.57 6 13.5 6H16v3h-2c-.55 0-1 .45-1 1v2h3v3h-3v6.95c5.05-.5 9-4.76 9-9.95"
|
|
290
|
+
})
|
|
291
|
+
})
|
|
292
|
+
}),
|
|
293
|
+
/*#__PURE__*/ _jsx(Button, {
|
|
294
|
+
variant: "outline",
|
|
295
|
+
size: "icon",
|
|
296
|
+
className: "h-10 w-10",
|
|
297
|
+
onClick: async ()=>{
|
|
298
|
+
await authClient.signIn.social({
|
|
299
|
+
provider: 'twitter',
|
|
300
|
+
callbackURL: '/dashboard'
|
|
301
|
+
});
|
|
302
|
+
},
|
|
303
|
+
title: "Twitter",
|
|
304
|
+
children: /*#__PURE__*/ _jsx("svg", {
|
|
305
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
306
|
+
width: "16",
|
|
307
|
+
height: "16",
|
|
308
|
+
viewBox: "0 0 14 14",
|
|
309
|
+
children: /*#__PURE__*/ _jsxs("g", {
|
|
310
|
+
fill: "none",
|
|
311
|
+
children: [
|
|
312
|
+
/*#__PURE__*/ _jsx("g", {
|
|
313
|
+
clipPath: "url(#primeTwitter0)",
|
|
314
|
+
children: /*#__PURE__*/ _jsx("path", {
|
|
315
|
+
fill: "currentColor",
|
|
316
|
+
d: "M11.025.656h2.147L8.482 6.03L14 13.344H9.68L6.294 8.909l-3.87 4.435H.275l5.016-5.75L0 .657h4.43L7.486 4.71zm-.755 11.4h1.19L3.78 1.877H2.504z"
|
|
317
|
+
})
|
|
318
|
+
}),
|
|
319
|
+
/*#__PURE__*/ _jsx("defs", {
|
|
320
|
+
children: /*#__PURE__*/ _jsx("clipPath", {
|
|
321
|
+
id: "primeTwitter0",
|
|
322
|
+
children: /*#__PURE__*/ _jsx("path", {
|
|
323
|
+
fill: "#fff",
|
|
324
|
+
d: "M0 0h14v14H0z"
|
|
325
|
+
})
|
|
326
|
+
})
|
|
327
|
+
})
|
|
328
|
+
]
|
|
329
|
+
})
|
|
330
|
+
})
|
|
331
|
+
})
|
|
332
|
+
]
|
|
333
|
+
})
|
|
334
|
+
]
|
|
335
|
+
}),
|
|
336
|
+
/*#__PURE__*/ _jsxs(Button, {
|
|
337
|
+
className: "w-full flex items-center justify-center gap-2 mt-2",
|
|
338
|
+
onClick: async ()=>{
|
|
339
|
+
await authClient.signIn.passkey({
|
|
340
|
+
fetchOptions: {
|
|
341
|
+
onSuccess (context) {
|
|
342
|
+
router.push(admin ? '/admin' : '/dashboard');
|
|
343
|
+
},
|
|
344
|
+
onError (context) {
|
|
345
|
+
toast.error(context.error.message);
|
|
346
|
+
}
|
|
347
|
+
}
|
|
348
|
+
});
|
|
349
|
+
},
|
|
350
|
+
children: [
|
|
351
|
+
/*#__PURE__*/ _jsx(Key, {
|
|
352
|
+
size: 16
|
|
353
|
+
}),
|
|
354
|
+
/*#__PURE__*/ _jsx("span", {
|
|
355
|
+
children: "Sign in with Passkey"
|
|
356
|
+
})
|
|
357
|
+
]
|
|
358
|
+
})
|
|
359
|
+
]
|
|
360
|
+
})
|
|
361
|
+
}),
|
|
362
|
+
/*#__PURE__*/ _jsx(CardFooter, {
|
|
363
|
+
className: "flex flex-col",
|
|
364
|
+
children: /*#__PURE__*/ _jsx("div", {
|
|
365
|
+
className: "w-full border-t pt-4",
|
|
366
|
+
children: /*#__PURE__*/ _jsxs("p", {
|
|
367
|
+
className: "text-center text-xs text-muted-foreground",
|
|
368
|
+
children: [
|
|
369
|
+
"Secured by",
|
|
370
|
+
' ',
|
|
371
|
+
/*#__PURE__*/ _jsx(Link, {
|
|
372
|
+
href: "https://github.com/forrestdevs/payload-better-auth",
|
|
373
|
+
className: "font-medium text-orange-500",
|
|
374
|
+
children: "payload-better-auth"
|
|
375
|
+
})
|
|
376
|
+
]
|
|
377
|
+
})
|
|
378
|
+
})
|
|
379
|
+
})
|
|
380
|
+
]
|
|
381
|
+
});
|
|
382
|
+
}
|
|
383
|
+
|
|
384
|
+
//# sourceMappingURL=sign-in.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../src/plugin/payload/components/sign-in.tsx"],"sourcesContent":["'use client'\n\nimport { createAuthClient } from 'better-auth/react'\nimport { Button } from './ui/button'\nimport { Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle } from './ui/card'\nimport { Checkbox } from './ui/checkbox'\nimport { Input } from './ui/input'\nimport { Label } from './ui/label'\nimport { PasswordInput } from './ui/password-input'\nimport { DiscordLogoIcon, GitHubLogoIcon } from '@radix-ui/react-icons'\nimport { Key, Loader2 } from 'lucide-react'\nimport Link from 'next/link'\nimport { useRouter } from 'next/navigation'\nimport { useState } from 'react'\nimport { toast } from 'sonner'\nimport { passkeyClient } from 'better-auth/client/plugins'\n\nexport default function SignIn({ admin = false }: { admin?: boolean }) {\n const [email, setEmail] = useState('')\n const [password, setPassword] = useState('')\n const [rememberMe, setRememberMe] = useState(false)\n const router = useRouter()\n const [loading, setLoading] = useState(false)\n\n const authClient = createAuthClient({\n plugins: [passkeyClient()],\n })\n\n return (\n <Card className=\"z-50 rounded-md rounded-t-none w-full max-w-md shadow-lg\">\n <CardHeader className=\"space-y-1\">\n <CardTitle className=\"text-xl md:text-2xl font-bold\">Sign In</CardTitle>\n <CardDescription className=\"text-sm text-muted-foreground\">\n {admin\n ? 'Enter your credentials to access the admin dashboard'\n : 'Enter your credentials to access your account'}\n </CardDescription>\n </CardHeader>\n <CardContent className=\"space-y-4\">\n <div className=\"space-y-4\">\n <div className=\"space-y-2\">\n <Label htmlFor=\"email\" className=\"text-sm font-medium\">\n Email\n </Label>\n <Input\n id=\"email\"\n type=\"email\"\n placeholder=\"m@example.com\"\n required\n onChange={(e) => {\n setEmail(e.target.value)\n }}\n value={email}\n className=\"w-full\"\n />\n </div>\n <div className=\"space-y-2\">\n <div className=\"flex items-center justify-between\">\n <Label htmlFor=\"password\" className=\"text-sm font-medium\">\n Password\n </Label>\n <Link href=\"/forget-password\" className=\"text-xs text-primary hover:underline\">\n Forgot password?\n </Link>\n </div>\n <PasswordInput\n id=\"password\"\n value={password}\n onChange={(e: any) => setPassword(e.target.value)}\n autoComplete=\"password\"\n placeholder=\"Password\"\n className=\"w-full\"\n />\n </div>\n {!admin && (\n <div className=\"flex items-center gap-2\">\n <Checkbox\n id=\"remember\"\n onClick={() => {\n setRememberMe(!rememberMe)\n }}\n />\n <Label htmlFor=\"remember\" className=\"text-sm\">\n Remember me\n </Label>\n </div>\n )}\n\n <Button\n type=\"submit\"\n className=\"w-full\"\n variant=\"outline\"\n disabled={loading}\n onClick={async () => {\n await authClient.signIn.email({\n email: email,\n password: password,\n callbackURL: admin ? '/admin' : '/dashboard',\n rememberMe,\n fetchOptions: {\n onRequest: () => {\n setLoading(true)\n },\n onResponse: () => {\n setLoading(false)\n },\n onError: (ctx) => {\n toast.error(ctx.error.message)\n },\n },\n })\n }}\n >\n {loading ? <Loader2 size={16} className=\"animate-spin mr-2\" /> : null}\n {loading ? 'Signing in...' : 'Sign in'}\n </Button>\n\n {!admin && (\n <div>\n <div className=\"relative my-4\">\n <div className=\"relative flex justify-center text-xs uppercase border-b border-muted pb-4\">\n <span className=\"bg-card px-2 text-muted-foreground\">Or continue with</span>\n </div>\n </div>\n\n <div className=\"grid grid-cols-4 gap-2 sm:grid-cols-7\">\n <Button\n variant=\"outline\"\n size=\"icon\"\n className=\"h-10 w-10\"\n onClick={async () => {\n await authClient.signIn.social({\n provider: 'github',\n callbackURL: '/dashboard',\n })\n }}\n title=\"GitHub\"\n >\n <GitHubLogoIcon className=\"h-4 w-4\" />\n </Button>\n <Button\n variant=\"outline\"\n size=\"icon\"\n className=\"h-10 w-10\"\n onClick={async () => {\n await authClient.signIn.social({\n provider: 'discord',\n callbackURL: '/dashboard',\n })\n }}\n title=\"Discord\"\n >\n <DiscordLogoIcon className=\"h-4 w-4\" />\n </Button>\n <Button\n variant=\"outline\"\n size=\"icon\"\n className=\"h-10 w-10\"\n onClick={async () => {\n await authClient.signIn.social({\n provider: 'google',\n callbackURL: '/dashboard',\n })\n }}\n title=\"Google\"\n >\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"16\"\n height=\"16\"\n viewBox=\"0 0 256 262\"\n >\n <path\n fill=\"#4285F4\"\n d=\"M255.878 133.451c0-10.734-.871-18.567-2.756-26.69H130.55v48.448h71.947c-1.45 12.04-9.283 30.172-26.69 42.356l-.244 1.622l38.755 30.023l2.685.268c24.659-22.774 38.875-56.282 38.875-96.027\"\n />\n <path\n fill=\"#34A853\"\n d=\"M130.55 261.1c35.248 0 64.839-11.605 86.453-31.622l-41.196-31.913c-11.024 7.688-25.82 13.055-45.257 13.055c-34.523 0-63.824-22.773-74.269-54.25l-1.531.13l-40.298 31.187l-.527 1.465C35.393 231.798 79.49 261.1 130.55 261.1\"\n />\n <path\n fill=\"#FBBC05\"\n d=\"M56.281 156.37c-2.756-8.123-4.351-16.827-4.351-25.82c0-8.994 1.595-17.697 4.206-25.82l-.073-1.73L15.26 71.312l-1.335.635C5.077 89.644 0 109.517 0 130.55s5.077 40.905 13.925 58.602z\"\n />\n <path\n fill=\"#EB4335\"\n d=\"M130.55 50.479c24.514 0 41.05 10.589 50.479 19.438l36.844-35.974C195.245 12.91 165.798 0 130.55 0C79.49 0 35.393 29.301 13.925 71.947l42.211 32.783c10.59-31.477 39.891-54.251 74.414-54.251\"\n />\n </svg>\n </Button>\n <Button\n variant=\"outline\"\n size=\"icon\"\n className=\"h-10 w-10\"\n onClick={async () => {\n const { data } = await authClient.signIn.social({\n provider: 'microsoft',\n callbackURL: '/dashboard',\n })\n }}\n title=\"Microsoft\"\n >\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"16\"\n height=\"16\"\n viewBox=\"0 0 24 24\"\n >\n <path\n fill=\"currentColor\"\n d=\"M2 3h9v9H2zm9 19H2v-9h9zM21 3v9h-9V3zm0 19h-9v-9h9z\"\n ></path>\n </svg>\n </Button>\n <Button\n variant=\"outline\"\n size=\"icon\"\n className=\"h-10 w-10\"\n onClick={async () => {\n await authClient.signIn.social({\n provider: 'twitch',\n callbackURL: '/dashboard',\n })\n }}\n title=\"Twitch\"\n >\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"16\"\n height=\"16\"\n viewBox=\"0 0 24 24\"\n >\n <path\n fill=\"currentColor\"\n d=\"M11.64 5.93h1.43v4.28h-1.43m3.93-4.28H17v4.28h-1.43M7 2L3.43 5.57v12.86h4.28V22l3.58-3.57h2.85L20.57 12V2m-1.43 9.29l-2.85 2.85h-2.86l-2.5 2.5v-2.5H7.71V3.43h11.43Z\"\n ></path>\n </svg>\n </Button>\n <Button\n variant=\"outline\"\n size=\"icon\"\n className=\"h-10 w-10\"\n onClick={async () => {\n await authClient.signIn.social({\n provider: 'facebook',\n callbackURL: '/dashboard',\n })\n }}\n title=\"Facebook\"\n >\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"16\"\n height=\"16\"\n viewBox=\"0 0 24 24\"\n >\n <path\n fill=\"currentColor\"\n d=\"M22 12c0-5.52-4.48-10-10-10S2 6.48 2 12c0 4.84 3.44 8.87 8 9.8V15H8v-3h2V9.5C10 7.57 11.57 6 13.5 6H16v3h-2c-.55 0-1 .45-1 1v2h3v3h-3v6.95c5.05-.5 9-4.76 9-9.95\"\n ></path>\n </svg>\n </Button>\n <Button\n variant=\"outline\"\n size=\"icon\"\n className=\"h-10 w-10\"\n onClick={async () => {\n await authClient.signIn.social({\n provider: 'twitter',\n callbackURL: '/dashboard',\n })\n }}\n title=\"Twitter\"\n >\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"16\"\n height=\"16\"\n viewBox=\"0 0 14 14\"\n >\n <g fill=\"none\">\n <g clipPath=\"url(#primeTwitter0)\">\n <path\n fill=\"currentColor\"\n d=\"M11.025.656h2.147L8.482 6.03L14 13.344H9.68L6.294 8.909l-3.87 4.435H.275l5.016-5.75L0 .657h4.43L7.486 4.71zm-.755 11.4h1.19L3.78 1.877H2.504z\"\n ></path>\n </g>\n <defs>\n <clipPath id=\"primeTwitter0\">\n <path fill=\"#fff\" d=\"M0 0h14v14H0z\"></path>\n </clipPath>\n </defs>\n </g>\n </svg>\n </Button>\n </div>\n </div>\n )}\n\n <Button\n className=\"w-full flex items-center justify-center gap-2 mt-2\"\n onClick={async () => {\n await authClient.signIn.passkey({\n fetchOptions: {\n onSuccess(context) {\n router.push(admin ? '/admin' : '/dashboard')\n },\n onError(context) {\n toast.error(context.error.message)\n },\n },\n })\n }}\n >\n <Key size={16} />\n <span>Sign in with Passkey</span>\n </Button>\n </div>\n </CardContent>\n <CardFooter className=\"flex flex-col\">\n <div className=\"w-full border-t pt-4\">\n <p className=\"text-center text-xs text-muted-foreground\">\n Secured by{' '}\n <Link\n href=\"https://github.com/forrestdevs/payload-better-auth\"\n className=\"font-medium text-orange-500\"\n >\n payload-better-auth\n </Link>\n </p>\n </div>\n </CardFooter>\n </Card>\n )\n}\n"],"names":["createAuthClient","Button","Card","CardContent","CardDescription","CardFooter","CardHeader","CardTitle","Checkbox","Input","Label","PasswordInput","DiscordLogoIcon","GitHubLogoIcon","Key","Loader2","Link","useRouter","useState","toast","passkeyClient","SignIn","admin","email","setEmail","password","setPassword","rememberMe","setRememberMe","router","loading","setLoading","authClient","plugins","className","div","htmlFor","id","type","placeholder","required","onChange","e","target","value","href","autoComplete","onClick","variant","disabled","signIn","callbackURL","fetchOptions","onRequest","onResponse","onError","ctx","error","message","size","span","social","provider","title","svg","xmlns","width","height","viewBox","path","fill","d","data","g","clipPath","defs","passkey","onSuccess","context","push","p"],"mappings":"AAAA;;AAEA,SAASA,gBAAgB,QAAQ,oBAAmB;AACpD,SAASC,MAAM,QAAQ,cAAa;AACpC,SAASC,IAAI,EAAEC,WAAW,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