mirror of
https://github.com/henrygd/beszel.git
synced 2026-03-23 22:16:18 +01:00
refactor(auth): rename honeypot field to avoid autofill (#1011)
This commit is contained in:
@@ -25,13 +25,13 @@ const passwordSchema = v.pipe(
|
|||||||
)
|
)
|
||||||
|
|
||||||
const LoginSchema = v.looseObject({
|
const LoginSchema = v.looseObject({
|
||||||
name: honeypot,
|
company_website: honeypot,
|
||||||
email: emailSchema,
|
email: emailSchema,
|
||||||
password: passwordSchema,
|
password: passwordSchema,
|
||||||
})
|
})
|
||||||
|
|
||||||
const RegisterSchema = v.looseObject({
|
const RegisterSchema = v.looseObject({
|
||||||
name: honeypot,
|
company_website: honeypot,
|
||||||
email: emailSchema,
|
email: emailSchema,
|
||||||
password: passwordSchema,
|
password: passwordSchema,
|
||||||
passwordConfirm: passwordSchema,
|
passwordConfirm: passwordSchema,
|
||||||
@@ -248,8 +248,8 @@ export function UserAuthForm({
|
|||||||
)}
|
)}
|
||||||
<div className="sr-only">
|
<div className="sr-only">
|
||||||
{/* honeypot */}
|
{/* honeypot */}
|
||||||
<label htmlFor="name"></label>
|
<label htmlFor="company_website"></label>
|
||||||
<input id="name" type="text" name="name" tabIndex={-1} autoComplete="off" />
|
<input id="company_website" type="text" name="company_website" tabIndex={-1} autoComplete="off" />
|
||||||
</div>
|
</div>
|
||||||
<button className={cn(buttonVariants())} disabled={isLoading}>
|
<button className={cn(buttonVariants())} disabled={isLoading}>
|
||||||
{isLoading ? (
|
{isLoading ? (
|
||||||
@@ -305,9 +305,9 @@ export function UserAuthForm({
|
|||||||
className="me-2 h-4 w-4 dark:brightness-0 dark:invert"
|
className="me-2 h-4 w-4 dark:brightness-0 dark:invert"
|
||||||
src={getAuthProviderIcon(provider)}
|
src={getAuthProviderIcon(provider)}
|
||||||
alt=""
|
alt=""
|
||||||
// onError={(e) => {
|
// onError={(e) => {
|
||||||
// e.currentTarget.src = "/static/lock.svg"
|
// e.currentTarget.src = "/static/lock.svg"
|
||||||
// }}
|
// }}
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
<span className="translate-y-px">{provider.displayName}</span>
|
<span className="translate-y-px">{provider.displayName}</span>
|
||||||
|
|||||||
Reference in New Issue
Block a user