Components
<DeleteAccountVerificationEmail />
Email template for verifying a permanent account deletion request.
Usage
import { DeleteAccountVerificationEmail } from "@better-auth-ui/react/email"
import { render } from "@react-email/render"
const html = await render(
<DeleteAccountVerificationEmail
url="https://better-auth-ui.com/api/auth/delete-user/callback?token=example-token"
appName="Better Auth UI"
logoURL={{
light: "/favicon-96x96.png",
dark: "/favicon-96x96-inverted.png"
}}
email="[email protected]"
expirationHours={24}
darkMode={true}
poweredBy={true}
/>
)Better Auth setup
Render this template from user.deleteUser.sendDeleteAccountVerification. Better Auth supplies the verification URL and user whose account is being deleted.
sendDeleteAccountVerification: async ({ user, url }) => {
const html = await render(
<DeleteAccountVerificationEmail
url={url}
email={user.email}
appName="My App"
/>
)
await sendEmail({
to: user.email,
subject: "Confirm account deletion",
html
})
}Installation
npx shadcn@latest add https://better-auth-ui.com/r/delete-account-verification-email.jsonProps
Prop
Type
Features
- Clearly states that account deletion is permanent
- Includes a verification button and fallback URL
- Explains that ignoring the message keeps the account active
- Supports expiration details, theming, branding, and localization
Last updated on