# Better Auth

Better Auth is a framework-agnostic authentication and authorization library for TypeScript that lives inside your application.

Canonical page: https://ourlocalhost.com/app/6910/better-auth

## Description

Better Auth is a framework-agnostic authentication and authorization library for TypeScript that lives inside your application. It provides built-in features including sessions, email verification, 2FA, and multi-tenant support, along with a plugin ecosystem for adding advanced capabilities with minimal code. Developers building web or full-stack TypeScript applications use it to avoid assembling multiple third-party authentication services.

## Platform availability

Available on 1 of 9 platforms: Linux.

## Desktop and other devices

Linux.

## Health score

79/100 (Good), based on 3 of 4 factors.
- Maintained: 100 (last commit 1 day ago)
- Popular: 90 (30,264 GitHub stars)
- Easy to install: 25 (1 install platform, install notes)

## Links

- Official website: https://better-auth.com
- GitHub: https://github.com/better-auth/better-auth
- Documentation: https://better-auth.com/docs

## Common questions

### Do Better Auth and Convex need matching versions when using the Convex backend?

Install the paired Better Auth add-on and listed Better Auth version, and keep Convex at 1.25.0 or later. If the versions do not match, login and signup can fail even though the app appears installed.

### What package should I add for secure session cookies in an Expo mobile app?

Install expo-secure-store so login cookies are stored securely. It keeps session tokens protected on the device instead of plain storage.

### Can Better Auth run as a standalone self-hosted auth server?

Yes, it can run alongside your app or as a standalone self-hosted auth server. Users stay in your database rather than a third-party service, with no per-user costs.

### Which database is supported when migrating managed Better Auth user data to self-hosted storage?

The managed service supports Postgres for that migration. It does not support MySQL or other databases for moving user data to self-hosted storage.

### Does Better Auth include enterprise SSO capabilities?

Yes, it lists SSO, SAML 2.0, SCIM, and directory sync as enterprise-ready features.

## Alternatives

- Auth0: You can connect any application (written in any language or on any stack) to Auth0 and define its Connection, the method used to authentica…
- Keycloak: Keycloak is an open-source Identity and Access Management platform for adding authentication to self-hosted applications.
- Okta: Okta's Workforce and Customer Identity Clouds enable secure access, authentication, and automation—putting identity at the heart of busines…
- Ory: Ory builds cloud-native authentication (login), authorization (permission), delegation (OAuth2, OpenID Connect), and user management softwa…
- authentik: Authentik is an open-source identity provider that adds flexible single sign-on, user management, and common sign-in protocol support to se…

---
Source: Our Local Host (https://ourlocalhost.com/app/6910/better-auth), the self-hosted and open-source app directory.
