For the complete documentation index, see llms.txt. Prefer markdown by appending.mdto documentation URLs or sendingAccept: text/markdown.
Overview
Better Auth for email, OAuth, sessions, and organizations on the web app. Secure authentication wired to your database and UI.
TurboStarter uses Better Auth to handle authentication. It's a secure, production-ready authentication solution that integrates seamlessly with many frameworks and provides enterprise-grade security out of the box.
Why Better Auth?
One of the core principles of TurboStarter is to do things as simple as possible, and to make everything as performant as possible.
Better Auth provides an excellent developer experience with minimal configuration while keeping enterprise-grade security. Its framework-agnostic approach and focus on performance make it the perfect choice for TurboStarter.
Recently, Better Auth announced an incorporation of Auth.js (28k+ stars on GitHub), making it even more powerful and flexible.

You can read more about Better Auth in the official documentation.
TurboStarter supports multiple authentication methods:
- Password - the traditional email/password method
- Magic Link - magic links
- OTP - one-time passwords with automatic expiration
- Passkey - passkeys (WebAuthn)
- Anonymous - allowing users to proceed anonymously
- OAuth - social providers (Apple, Google, and GitHub preconfigured)
- Google One Tap - native, one-click prompt for Google authentication
As well as common applications flows, with ready-to-use views and components:
- Sign in - sign in with email/password, magic link, one-time password, or OAuth providers
- Sign up - sign up with email/password or OAuth providers
- Sign out - end session by signing out
- 2FA - two-factor authentication with TOTP, OTP, or recovery codes
- Password recovery - forgot and reset password
- Email verification - verify email address
You can build your auth flow like LEGO bricks - plug in only the parts you need and customize them as you wish.
Configuration
Toggle password, magic link, OTP, passkey, anonymous, and OAuth providers independently through the Better Auth server config and UI provider list.
User flow
Follow the TurboStarter authentication flow from sign-up to session. How login, callbacks, and protected routes work in your web app.
OAuth
Configure OAuth sign-in for your web app. Provider credentials, redirect URLs, and session handling with Better Auth.
Two-Factor Authentication (2FA)
Add two-factor authentication with TOTP and backup codes via Better Auth. Secure enrollment, verification, and recovery flows for your web app.
How is this guide?
Last updated on