[PR #4098] [CLOSED] docs: add integration with NestJs async module #13435

Closed
opened 2026-04-13 08:56:16 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/better-auth/better-auth/pull/4098
Author: @buiducnhat
Created: 8/20/2025
Status: Closed

Base: canaryHead: docs/nestjs-async


📝 Commits (4)

  • 81e12c7 docs: add integration with NestJs async module
  • 44837ff Merge branch 'canary' into docs/nestjs-async
  • 5df9a3b docs: update path of nestjs async to community plugins instead of integrations
  • d3a3406 Merge branch 'better-auth:canary' into docs/nestjs-async

📊 Changes

1 file changed (+1 additions, -0 deletions)

View changed files

📝 docs/content/docs/plugins/community-plugins.mdx (+1 -0)

📄 Description

I want to contribute my own package for integrating NestJs.

While I am aware that an existing integration package is already available, I have identified several critical features it lacks, such as support for the fastify adapter and the async module.


Summary by cubic

Adds a new NestJS integration guide for Better Auth with async module support and Fastify, and links it in the docs sidebar. This helps users set up Better Auth in Nest (Express or Fastify), and use guards, decorators, and DI.

  • New Features
    • New guide at /docs/integrations/nestjs-with-async covering Express and Fastify.
    • Async setup via AuthModule.forRootAsync with ConfigModule example.
    • Examples for AuthGuard and decorators (@CurrentUser, @Session, @IsPublic, @User, @UserSession).
    • Instructions to inject and use the Better Auth instance (BETTER_AUTH_INSTANCE_TOKEN).
    • Sidebar updated with “NestJS (Async)”.

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/better-auth/better-auth/pull/4098 **Author:** [@buiducnhat](https://github.com/buiducnhat) **Created:** 8/20/2025 **Status:** ❌ Closed **Base:** `canary` ← **Head:** `docs/nestjs-async` --- ### 📝 Commits (4) - [`81e12c7`](https://github.com/better-auth/better-auth/commit/81e12c7ee6e2287194a3c0a635413a2a526acd33) docs: add integration with NestJs async module - [`44837ff`](https://github.com/better-auth/better-auth/commit/44837ff8a3fd7c534b493c9eabce2b8ca647fa08) Merge branch 'canary' into docs/nestjs-async - [`5df9a3b`](https://github.com/better-auth/better-auth/commit/5df9a3b5772de4dc64e5451bbee304bdeda361a2) docs: update path of nestjs async to community plugins instead of integrations - [`d3a3406`](https://github.com/better-auth/better-auth/commit/d3a3406dc51ad89a9b76bafc0d2c034d3eee80d5) Merge branch 'better-auth:canary' into docs/nestjs-async ### 📊 Changes **1 file changed** (+1 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `docs/content/docs/plugins/community-plugins.mdx` (+1 -0) </details> ### 📄 Description I want to contribute my own package for integrating NestJs. While I am aware that an existing integration package is already available, I have identified several critical features it lacks, such as support for the `fastify` adapter and the async module. <!-- This is an auto-generated description by cubic. --> --- ## Summary by cubic Adds a new NestJS integration guide for Better Auth with async module support and Fastify, and links it in the docs sidebar. This helps users set up Better Auth in Nest (Express or Fastify), and use guards, decorators, and DI. - **New Features** - New guide at /docs/integrations/nestjs-with-async covering Express and Fastify. - Async setup via AuthModule.forRootAsync with ConfigModule example. - Examples for AuthGuard and decorators (@CurrentUser, @Session, @IsPublic, @User, @UserSession). - Instructions to inject and use the Better Auth instance (BETTER_AUTH_INSTANCE_TOKEN). - Sidebar updated with “NestJS (Async)”. <!-- End of auto-generated description by cubic. --> --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2026-04-13 08:56:16 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/better-auth#13435