個人 GitHub 帳號下公開儲存庫的擁有者可以登入並驗證所有權,自行管理介紹,無需管理員核准。
登入並產生驗證檔案,在 30 分鐘內將其提交至此儲存庫的預設分支。其他分支或分叉儲存庫中的檔案無效。然後在下方檢查檔案,即可無需管理員核准直接管理專案。請保留檔案以維持管理權限。
如需登入,將前往登入頁面。登入後請回到此處,再次點擊所選的驗證按鈕。
在專案資料夾中執行 /nomorevibe verify,即可驗證所有權並自行管理介紹。
一分鐘完成驗證Sign-in, account, organization and admin pages for Better Auth in Nuxt, built with Nuxt UI
翻譯準備中
正在載入完整 README。
檢視完整 README ↗Auth UI for Better Auth in Nuxt, built with Nuxt UI.
/admin: users, sessions, bans, staff roles, impersonation, an audit log and staff notes,
through Better Auth's Admin plugin.Everything is configured under betterAuthUi in nuxt.config.ts. When a feature needs a Better Auth plugin, the
module adds it for you.
pnpm add @treygrr/nuxt-better-auth-ui @iconify-json/lucide @iconify-json/simple-icons
// nuxt.config.ts
export default defineNuxtConfig({
modules: ['@treygrr/nuxt-better-auth-ui'],
betterAuthUi: {
twoFactor: { enabled: true },
passkey: { enabled: true }
}
});
Then point Tailwind at the module's pages, run Better Auth's migrations, and give yourself the admin role: see Installation.
| Getting started | Installation, and every option at a glance |
| Sign-in | The pages, the account page, every sign-in method, two-factor, passkeys, security |
| Organizations | Organizations, roles and permissions, single sign-on |
| Admin dashboard | Managing users, staff roles, the audit log |
| Integrations | Stripe, API keys, bearer tokens and JWTs |
| Customization | Emails, languages and your own words |
Contributions are welcome: see Contributing for setting up, the tests, and adding a feature.
pnpm install
cp playground/.env.example playground/.env
pnpm dev:prepare
pnpm dev # the playground
pnpm test # builds the module and the playground, starts it once, then runs the API tests and the browser tests
pnpm typecheck
pnpm fmt
pnpm docs:dev # the documentation site (docs/), on http://localhost:3002
pnpm docs:generate # its static build, as GitHub Pages serves it
pnpm docs:screenshots # retakes the docs' screenshots, from a built playground
The repository is a pnpm workspace: the module at the root, playground/ and docs/ (the documentation site, made
with Nuxt Content from the Nuxt UI docs template). Pushes to main that change docs/ publish it to GitHub Pages
(.github/workflows/docs.yml).
The browser tests (test/browser/) drive Chromium through the pages: signing up and in, magic links, password
resets, the account tabs, two-factor end to end, passkeys with Chromium's virtual authenticator, organizations, single
sign-on and the admin. Any console error or warning fails them, so a hydration mismatch does. They use
CHROMIUM_PATH, a system Chromium or Chrome, or Playwright's own (npx playwright install chromium); without one
they're skipped.
On startup the playground seeds an admin ([email protected] / password123 by default) and 40 mock users from
playground/.env: join dates over six months, verified and unverified emails, two more admins, three bans
(permanent, expiring, expired), a moderator ([email protected], for trying the playground's moderator role),
linked GitHub, Google and Discord accounts (some users have no password), and active sessions on different devices.
Mock users share the admin's password. It only adds users that are missing, so delete playground/.data/auth.sqlite
to start over.
MIT. The parts adapted from the Nuxt UI dashboard template keep its MIT notice; see LICENSE.