# Better-Auth

Better Auth is a framework-agnostic authentication and authorization framework for TypeScript. It provides a comprehensive set of features out of the box and includes a plugin ecosystem for adding advanced functionalities like 2FA, passkey, multi-tenancy, and SSO.

## Prerequisites

Set up your Better-Auth backend first and obtain the path at which the APIs from Better-Auth are exposed.

:::warning
Make sure to use the `Bearer` plugin from Better-Auth. The Bearer plugin enables authentication using Bearer tokens as an alternative to browser cookies. It intercepts requests, adding the Bearer token to the Authorization header before forwarding them to your API.
:::

## Set up your provider

To set up Better-Auth to authenticate users with Openfort, visit your [dashboard provider settings](https://dashboard.openfort.io/providers).

<div align="center">
  <img width="50%" height="50%" src="https://www.openfort.io/images/blog/better_auth_fa9c4d2458.png" alt="Better-Auth provider configuration in Openfort dashboard" />
</div>
