payload-better-auth 1.0.7 → 1.0.9

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.
@@ -88,7 +88,7 @@ export function EmailPasswordFormClient({ authClientOptions, authMethods }) {
88
88
  }
89
89
  } else if (withMagicLink && passwordValue === '') {
90
90
  const result = await authClient.signIn.magicLink({
91
- callbackURL: `/admin`,
91
+ callbackURL: `${window.location.origin}/admin`,
92
92
  email: String(emailValue || '')
93
93
  });
94
94
  if (result.error) {
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/components/EmailPasswordFormClient.tsx"],"sourcesContent":["'use client'\n\nimport type { ChangeEvent, default as React } from 'react'\nimport type { AuthMethod } from 'src/better-auth/helpers.js'\n\nimport { Button, FieldLabel, TextInput } from '@payloadcms/ui'\nimport { magicLinkClient } from 'better-auth/client/plugins'\nimport { createAuthClient } from 'better-auth/react'\nimport { useRouter } from 'next/navigation.js'\nimport { useState } from 'react'\n\ninterface FormErrors {\n email?: string\n general?: string\n password?: string\n}\n\nexport function EmailPasswordFormClient({\n authClientOptions,\n authMethods,\n}: {\n authClientOptions: Parameters<typeof createAuthClient>['0']\n authMethods: AuthMethod[]\n}) {\n const authClient = createAuthClient({\n ...authClientOptions,\n plugins: [\n ...(authClientOptions?.plugins?.filter((p) => p.id !== 'magic-link') ?? []),\n magicLinkClient(),\n ],\n })\n const router = useRouter()\n const [errors, setErrors] = useState<FormErrors>({})\n const [isLoading, setIsLoading] = useState(false)\n\n // Use useField hooks for each input to get proper setValue functions\n const [emailValue, setEmailValue] = useState('')\n const [passwordValue, setPasswordValue] = useState('')\n\n const withEmailAndPassword = authMethods.find((m) => m.method === 'emailAndPassword')\n const withMagicLink = authMethods.find((m) => m.method === 'magicLink')\n\n if (!withEmailAndPassword && !withMagicLink) {\n throw new Error(\"This Form can't render with neither email nor magicLink activated.\")\n }\n\n const handleEmailChange = (event: ChangeEvent<HTMLInputElement>) => {\n setEmailValue(event.target.value)\n // Clear field-specific error when user starts typing\n if (errors.email) {\n setErrors((prev) => ({ ...prev, email: undefined }))\n }\n }\n\n const handlePasswordChange = (event: ChangeEvent<HTMLInputElement>) => {\n setPasswordValue(event.target.value)\n // Clear field-specific error when user starts typing\n if (errors.password) {\n setErrors((prev) => ({ ...prev, password: undefined }))\n }\n }\n\n const validateForm = (): boolean => {\n const newErrors: FormErrors = {}\n const email = String(emailValue || '').trim()\n const password = String(passwordValue || '').trim()\n\n if (!email) {\n newErrors.email = 'Email is required'\n } else if (!/^[^\\s@]+@[^\\s@][^\\s.@]*\\.[^\\s@]+$/.test(email)) {\n newErrors.email = 'Please enter a valid email address'\n }\n\n if (withEmailAndPassword && !withMagicLink) {\n if (!password) {\n newErrors.password = 'Password is required'\n // TODO: verify if minPasswordLength is also set if not actively specified\n } else if (password.length < withEmailAndPassword.options.minPasswordLength) {\n newErrors.password = `Password must be at least ${withEmailAndPassword.options.minPasswordLength} characters`\n }\n }\n\n setErrors(newErrors)\n return Object.keys(newErrors).length === 0\n }\n\n const handleSubmit = async (e: React.FormEvent) => {\n e.preventDefault()\n\n if (!validateForm()) {\n return\n }\n\n setIsLoading(true)\n setErrors({})\n\n try {\n if (withEmailAndPassword && passwordValue !== '') {\n const result = await authClient.signIn.email({\n email: String(emailValue || ''),\n password: String(passwordValue || ''),\n })\n\n if (result.error) {\n setErrors({\n general: result.error.message || 'Sign in failed. Please check your credentials.',\n })\n } else {\n // Successful sign in - redirect to admin\n router.push('/admin')\n router.refresh()\n }\n } else if (withMagicLink && passwordValue === '') {\n const result = await authClient.signIn.magicLink({\n callbackURL: `/admin`,\n email: String(emailValue || ''),\n })\n\n if (result.error) {\n setErrors({\n general: result.error.message || 'Sign in failed. Please check your credentials.',\n })\n } else {\n // Successful sign in - redirect to admin\n router.push('/admin/auth/verify-email')\n router.refresh()\n }\n }\n } catch (error) {\n setErrors({\n general: (error as Error).message,\n })\n } finally {\n setIsLoading(false)\n }\n }\n\n const errorStyle = {\n color: '#dc2626',\n fontSize: '0.875rem',\n marginTop: '0.25rem',\n }\n\n return (\n <form className=\"email-password-form\" onSubmit={handleSubmit}>\n <div className=\"form-field\" style={{ marginBottom: '1.5rem' }}>\n <FieldLabel htmlFor=\"email\" label=\"Email\" required />\n <TextInput\n onChange={handleEmailChange}\n path=\"email\"\n readOnly={isLoading}\n required\n value={emailValue || ''}\n />\n {errors.email && (\n <div className=\"field-error\" style={errorStyle}>\n {errors.email}\n </div>\n )}\n </div>\n\n <div className=\"form-field\" style={{ marginBottom: '1.5rem' }}>\n <FieldLabel\n htmlFor=\"password\"\n label={`Password ${withMagicLink && '(Optional)'}`}\n required={!withMagicLink}\n />\n <TextInput\n onChange={handlePasswordChange}\n path=\"password\"\n readOnly={isLoading}\n required={!withMagicLink}\n value={passwordValue || ''}\n />\n {errors.password && (\n <div className=\"field-error\" style={errorStyle}>\n {errors.password}\n </div>\n )}\n </div>\n\n {errors.general && (\n <div\n className=\"general-error\"\n style={{\n ...errorStyle,\n backgroundColor: '#fef2f2',\n border: '1px solid #fecaca',\n borderRadius: '0.375rem',\n marginBottom: '1rem',\n padding: '0.75rem',\n }}\n >\n {errors.general}\n </div>\n )}\n\n <Button buttonStyle=\"primary\" disabled={isLoading} size=\"large\" type=\"submit\">\n {isLoading ? 'Signing In...' : 'Sign In'}\n </Button>\n </form>\n )\n}\n"],"names":["Button","FieldLabel","TextInput","magicLinkClient","createAuthClient","useRouter","useState","EmailPasswordFormClient","authClientOptions","authMethods","authClient","plugins","filter","p","id","router","errors","setErrors","isLoading","setIsLoading","emailValue","setEmailValue","passwordValue","setPasswordValue","withEmailAndPassword","find","m","method","withMagicLink","Error","handleEmailChange","event","target","value","email","prev","undefined","handlePasswordChange","password","validateForm","newErrors","String","trim","test","length","options","minPasswordLength","Object","keys","handleSubmit","e","preventDefault","result","signIn","error","general","message","push","refresh","magicLink","callbackURL","errorStyle","color","fontSize","marginTop","form","className","onSubmit","div","style","marginBottom","htmlFor","label","required","onChange","path","readOnly","backgroundCol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BAAiB;;oBAEzBN,OAAOsB,QAAQ,kBACd,KAAC8B;wBAAIF,WAAU;wBAAcG,OAAOR;kCACjC7C,OAAOsB,QAAQ;;;;YAKrBtB,OAAOuC,OAAO,kBACb,KAACa;gBACCF,WAAU;gBACVG,OAAO;oBACL,GAAGR,UAAU;oBACbgB,iBAAiB;oBACjBC,QAAQ;oBACRC,cAAc;oBACdT,cAAc;oBACdU,SAAS;gBACX;0BAEChE,OAAOuC,OAAO;;0BAInB,KAACvD;gBAAOiF,aAAY;gBAAUC,UAAUhE;gBAAWiE,MAAK;gBAAQC,MAAK;0BAClElE,YAAY,kBAAkB;;;;AAIvC"}
1
+ {"version":3,"sources":["../../src/components/EmailPasswordFormClient.tsx"],"sourcesContent":["'use client'\n\nimport type { ChangeEvent, default as React } from 'react'\nimport type { AuthMethod } from 'src/better-auth/helpers.js'\n\nimport { Button, FieldLabel, TextInput } from '@payloadcms/ui'\nimport { magicLinkClient } from 'better-auth/client/plugins'\nimport { createAuthClient } from 'better-auth/react'\nimport { useRouter } from 'next/navigation.js'\nimport { useState } from 'react'\n\ninterface FormErrors {\n email?: string\n general?: string\n password?: string\n}\n\nexport function EmailPasswordFormClient({\n authClientOptions,\n authMethods,\n}: {\n authClientOptions: Parameters<typeof createAuthClient>['0']\n authMethods: AuthMethod[]\n}) {\n const authClient = createAuthClient({\n ...authClientOptions,\n plugins: [\n ...(authClientOptions?.plugins?.filter((p) => p.id !== 'magic-link') ?? []),\n magicLinkClient(),\n ],\n })\n const router = useRouter()\n const [errors, setErrors] = useState<FormErrors>({})\n const [isLoading, setIsLoading] = useState(false)\n\n // Use useField hooks for each input to get proper setValue functions\n const [emailValue, setEmailValue] = useState('')\n const [passwordValue, setPasswordValue] = useState('')\n\n const withEmailAndPassword = authMethods.find((m) => m.method === 'emailAndPassword')\n const withMagicLink = authMethods.find((m) => m.method === 'magicLink')\n\n if (!withEmailAndPassword && !withMagicLink) {\n throw new Error(\"This Form can't render with neither email nor magicLink activated.\")\n }\n\n const handleEmailChange = (event: ChangeEvent<HTMLInputElement>) => {\n setEmailValue(event.target.value)\n // Clear field-specific error when user starts typing\n if (errors.email) {\n setErrors((prev) => ({ ...prev, email: undefined }))\n }\n }\n\n const handlePasswordChange = (event: ChangeEvent<HTMLInputElement>) => {\n setPasswordValue(event.target.value)\n // Clear field-specific error when user starts typing\n if (errors.password) {\n setErrors((prev) => ({ ...prev, password: undefined }))\n }\n }\n\n const validateForm = (): boolean => {\n const newErrors: FormErrors = {}\n const email = String(emailValue || '').trim()\n const password = String(passwordValue || '').trim()\n\n if (!email) {\n newErrors.email = 'Email is required'\n } else if (!/^[^\\s@]+@[^\\s@][^\\s.@]*\\.[^\\s@]+$/.test(email)) {\n newErrors.email = 'Please enter a valid email address'\n }\n\n if (withEmailAndPassword && !withMagicLink) {\n if (!password) {\n newErrors.password = 'Password is required'\n // TODO: verify if minPasswordLength is also set if not actively specified\n } else if (password.length < withEmailAndPassword.options.minPasswordLength) {\n newErrors.password = `Password must be at least ${withEmailAndPassword.options.minPasswordLength} characters`\n }\n }\n\n setErrors(newErrors)\n return Object.keys(newErrors).length === 0\n }\n\n const handleSubmit = async (e: React.FormEvent) => {\n e.preventDefault()\n\n if (!validateForm()) {\n return\n }\n\n setIsLoading(true)\n setErrors({})\n\n try {\n if (withEmailAndPassword && passwordValue !== '') {\n const result = await authClient.signIn.email({\n email: String(emailValue || ''),\n password: String(passwordValue || ''),\n })\n\n if (result.error) {\n setErrors({\n general: result.error.message || 'Sign in failed. Please check your credentials.',\n })\n } else {\n // Successful sign in - redirect to admin\n router.push('/admin')\n router.refresh()\n }\n } else if (withMagicLink && passwordValue === '') {\n const result = await authClient.signIn.magicLink({\n callbackURL: `${window.location.origin}/admin`,\n email: String(emailValue || ''),\n })\n\n if (result.error) {\n setErrors({\n general: result.error.message || 'Sign in failed. Please check your credentials.',\n })\n } else {\n // Successful sign in - redirect to admin\n router.push('/admin/auth/verify-email')\n router.refresh()\n }\n }\n } catch (error) {\n setErrors({\n general: (error as Error).message,\n })\n } finally {\n setIsLoading(false)\n }\n }\n\n const errorStyle = {\n color: '#dc2626',\n fontSize: '0.875rem',\n marginTop: '0.25rem',\n }\n\n return (\n <form className=\"email-password-form\" onSubmit={handleSubmit}>\n <div className=\"form-field\" style={{ marginBottom: '1.5rem' }}>\n <FieldLabel htmlFor=\"email\" label=\"Email\" required />\n <TextInput\n onChange={handleEmailChange}\n path=\"email\"\n readOnly={isLoading}\n required\n value={emailValue || ''}\n />\n {errors.email && (\n <div className=\"field-error\" style={errorStyle}>\n {errors.email}\n </div>\n )}\n </div>\n\n <div className=\"form-field\" style={{ marginBottom: '1.5rem' }}>\n <FieldLabel\n htmlFor=\"password\"\n label={`Password ${withMagicLink && '(Optional)'}`}\n required={!withMagicLink}\n />\n <TextInput\n onChange={handlePasswordChange}\n path=\"password\"\n readOnly={isLoading}\n required={!withMagicLink}\n value={passwordValue || ''}\n />\n {errors.password && (\n <div className=\"field-error\" style={errorStyle}>\n {errors.password}\n </div>\n )}\n </div>\n\n {errors.general && (\n <div\n className=\"general-error\"\n style={{\n ...errorStyle,\n backgroundColor: '#fef2f2',\n border: '1px solid #fecaca',\n borderRadius: '0.375rem',\n marginBottom: '1rem',\n padding: '0.75rem',\n }}\n >\n {errors.general}\n </div>\n )}\n\n <Button buttonStyle=\"primary\" disabled={isLoading} size=\"large\" type=\"submit\">\n {isLoading ? 'Signing In...' : 'Sign In'}\n </Button>\n </form>\n )\n}\n"],"names":["Button","FieldLabel","TextInput","magicLinkClient","createAuthClient","useRouter","useState","EmailPasswordFormClient","authClientOptions","authMethods","authClient","plugins","filter","p","id","router","errors","setErrors","isLoading","setIsLoading","emailValue","setEmailValue","passwordValue","setPasswordValue","withEmailAndPassword","find","m","method","withMagicLink","Error","handleEmailChange","event","target","value","email","prev","undefined","handlePasswordChange","password","validateForm","newErrors","String","trim","test","length","options","minPasswordLength","Object","keys","handleSubmit","e","preventDefault","result","signIn","error","general","message","push","refresh","magicLink","callbackURL","window","location","origin","errorStyle","color","fontSize","marginTop","form","className","onSubmit","div","style","marginBottom","htmlFor","label","required","onChange","path","readOnly","backgroundColor","border","borderRadius","padding","buttonStyle","disabled","size","type"],"mappings":"AAAA;;AAKA,SAASA,MAAM,EAAEC,UAAU,EAAEC,SAAS,QAAQ,iBAAgB;AAC9D,SAASC,eAAe,QAAQ,6BAA4B;AAC5D,SAASC,gBAAgB,QAAQ,oBAAmB;AACpD,SAASC,SAAS,QAAQ,qBAAoB;AAC9C,SAASC,QAAQ,QAAQ,QAAO;AAQhC,OAAO,SAASC,wBAAwB,EACtCC,iBAAiB,EACjBC,WAAW,EAIZ;IACC,MAAMC,aAAaN,iBAAiB;QAClC,GAAGI,iBAAiB;QACpBG,SAAS;eACHH,mBAAmBG,SAASC,OAAO,CAACC,IAAMA,EAAEC,EAAE,KAAK,iBAAiB,EAAE;YAC1EX;SACD;IACH;IACA,MAAMY,SAASV;IACf,MAAM,CAACW,QAAQC,UAAU,GAAGX,SAAqB,CAAC;IAClD,MAAM,CAACY,WAAWC,aAAa,GAAGb,SAAS;IAE3C,qEAAqE;IACrE,MAAM,CAACc,YAAYC,cAAc,GAAGf,SAAS;IAC7C,MAAM,CAACgB,eAAeC,iBAAiB,GAAGjB,SAAS;IAEnD,MAAMkB,uBAAuBf,YAAYgB,IAAI,CAAC,CAACC,IAAMA,EAAEC,MAAM,KAAK;IAClE,MAAMC,gBAAgBnB,YAAYgB,IAAI,CAAC,CAACC,IAAMA,EAAEC,MAAM,KAAK;IAE3D,IAAI,CAACH,wBAAwB,CAACI,eAAe;QAC3C,MAAM,IAAIC,MAAM;IAClB;IAEA,MAAMC,oBAAoB,CAACC;QACzBV,cAAcU,MAAMC,MAAM,CAACC,KAAK;QAChC,qDAAqD;QACrD,IAAIjB,OAAOkB,KAAK,EAAE;YAChBjB,UAAU,CAACkB,OAAU,CAAA;oBAAE,GAAGA,IAAI;oBAAED,OAAOE;gBAAU,CAAA;QACnD;IACF;IAEA,MAAMC,uBAAuB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,UAAU,CAAChD;;kCAEb,KAAC1B;wBACC2E,UAAUxC;wBACVyC,MAAK;wBACLC,UAAU7D;wBACV0D,UAAU,CAAChD;wBACXK,OAAOX,iBAAiB;;oBAEzBN,OAAOsB,QAAQ,kBACd,KAACiC;wBAAIF,WAAU;wBAAcG,OAAOR;kCACjChD,OAAOsB,QAAQ;;;;YAKrBtB,OAAOuC,OAAO,kBACb,KAACgB;gBACCF,WAAU;gBACVG,OAAO;oBACL,GAAGR,UAAU;oBACbgB,iBAAiB;oBACjBC,QAAQ;oBACRC,cAAc;oBACdT,cAAc;oBACdU,SAAS;gBACX;0BAECnE,OAAOuC,OAAO;;0BAInB,KAACvD;gBAAOoF,aAAY;gBAAUC,UAAUnE;gBAAWoE,MAAK;gBAAQC,MAAK;0BAClErE,YAAY,kBAAkB;;;;AAIvC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "payload-better-auth",
3
- "version": "1.0.7",
3
+ "version": "1.0.9",
4
4
  "description": "A blank template to get started with Payload 3.0",
5
5
  "license": "MIT",
6
6
  "type": "module",