{"repo":"flaviodelgrosso/fastify-better-auth","free":true,"listed":false,"github":"https://github.com/flaviodelgrosso/fastify-better-auth","clone":"git clone https://github.com/flaviodelgrosso/fastify-better-auth.git","description":"Easy integration of BetterAuth library in Fastify applications 🛡️","language":"TypeScript","stars":54,"topics":["authentication","better-auth","fastify","fastify-plugin","nodejs"],"license":"ISC","category":"auth-billing-email","readme_excerpt":"Fastify Better Auth Fastify Better Auth is a Fastify plugin that simplifies the integration of the Better Auth library into your Fastify applications. This plugin automatically registers authentication routes and provides utilities to access the auth instance and session data in your application. Features - 🚀 Easy integration with Better Auth - 🛡️ Automatic route registration for authentication endpoints - 🔧 Type-safe decorator access to auth instance - ⚡ Compatible with Fastify 5.x and Better Auth 1.x Requirements - Fastify 5.x - Better Auth 1.x Installation Quick Start 1. Create the Better Auth instance 2. Register the plugin Option 1: Using fastify-plugin Option 2: Using Fastify Autoload 3. Start using authentication Once registered, the plugin automatically creates authentication routes under /api/auth/ and decorates your Fastify instance with the auth utilities. API Reference Plugin Options - auth : A Better Auth instance created with betterAuth() Available Routes The plugin automatically registers the following authentication routes: - POST /api/auth/sign-in - Sign in with email/password - POST /api/auth/sign-up - Create a new account - POST /api/auth/sign-out - Sign out the current user - GET /api/auth/session - Get current session - And all other Better Auth endpoints... Advanced Usage Accessing the Better Auth Instance When registering the plugin, it decorates the Fastify instance with the Better Auth instance. You can use getAuthDecorator() to access the auth ins","default_branch":null,"files":null,"tree":[],"storefront":"/r/flaviodelgrosso","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/flaviodelgrosso/fastify-better-auth/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}