New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

validation-better-auth

Package Overview
Dependencies
Maintainers
0
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

validation-better-auth

A flexible and extensible validation plugin for the Better Auth framework. This package allows developers to validate API request using standard library

  • 1.1.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
0
Created
Source

validation-better-auth

A flexible and extensible validation plugin for the Better Auth framework. This package allows developers to validate API request using any standard schema library (e.g. Zod, Valibot, ArkType). We also support Yup by wrapping the schema internally to Standard Schema.

usage

import { betterAuth } from "better-auth"
import { validator, StandardAdapter} from "validation-better-auth"
 
export const auth = betterAuth({
    // ... other config options
    appName: "My App", // provide your app name. It'll be used as an issuer.
    plugins: [
        validator(
      [
        {path: "/sign-up/email", adapter: StandardAdapter(SignupSchema)},
        {path: "/sign-in/email", adapter: StandardAdapter(SignInSchema)},
        {path: "/two-factor/enable", adapter: StandardAdapter(PasswordSchema)},
        {path: "/two-factor/disable", adapter: StandardAdapter(PasswordSchema)},
        {path: "/two-factor/verify-otp", adapter: StandardAdapter(twoFactorSchema)},
        {path: "/forgot-password", adapter: StandardAdapter(ForgotPasswordSchema)},
      ]
    ),
    ]
})```

Keywords

FAQs

Package last updated on 12 Feb 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc