Authentication

Built-in authentication powered by Better Auth. Configure strategies, roles, two-factor authentication, and email templates.

Strategies

email-password (default), magic-link (passwordless email), and OAuth providers (google, github, apple, microsoft, facebook, twitter, discord, spotify, twitch, gitlab, bitbucket, linkedin, dropbox).

Roles & Permissions

Three built-in roles: admin, member, viewer. Define custom roles with name + description. Set defaultRole for new users. First user automatically becomes admin.

Two-Factor Auth

Optional TOTP-based 2FA. Enable with twoFactor: true in the auth config. Users can set up authenticator apps.

Email Templates

Customizable emails for verification, password reset, and magic link. Supports $name, $url, $email variable substitution in subject and body.

auth: strategies: - type: email-password - type: magic-link - type: oauth provider: google defaultRole: member roles: - name: editor description: Can edit content twoFactor: true emails: verification: subject: "Verify your email, $name" body: "Click here to verify: $url"