# Better Auth for EmDash

> Full authentication for EmDash CMS powered by Better Auth: email and password, social login, passwordless, 2FA, passkeys, organizations, OIDC provider, Stripe billing and audit logging.

Source: https://emdashcmseverything.com/plugins/better-auth/

- Category: Security
- Status: available
- Version: 0.16.0
- Price: Unknown
- Compatibility: EmDash >=0.30.0
- License: MIT
- Maintainer: The Weekend Projects
- Download: https://www.npmjs.com/package/emdash-better-auth
- Repository: https://github.com/theweekendprojects/emdash-better-auth
- Published: 2026-11-01

Full authentication for EmDash CMS powered by Better Auth: email and password, social login, passwordless, 2FA, passkeys, organizations, OIDC provider, Stripe billing and audit logging.

## Installation

Install the package from npm:

```bash
npm install emdash-better-auth
```

Register the plugin in your Astro config:

```js
// astro.config.mjs
import react from "@astrojs/react";
import tailwindcss from "@tailwindcss/vite";
import { betterAuthProvider, betterAuthSettingsPlugin } from "emdash-better-auth";

export default defineConfig({
  output: "server",
  vite: { plugins: [tailwindcss()] },          // required for the HeroUI auth styles
  integrations: [
    react(),                                    // auth pages are React islands
    emdash({
      /* ...your database / storage... */
      authProviders: [betterAuthProvider()],    // sign-in/up, /auth/*, /account/*
      plugins: [betterAuthSettingsPlugin()],    // optional: admin settings page
    }),
  ],
});
```

## Details

- **Latest version:** 0.16.0
- **License:** MIT
- **Publisher:** The Weekend Projects
- **Requires:** EmDash `>=0.30.0`
- **Source repository:** [https://github.com/theweekendprojects/emdash-better-auth](https://github.com/theweekendprojects/emdash-better-auth)
- **npm package:** [emdash-better-auth](https://www.npmjs.com/package/emdash-better-auth)
