Przejdź do treści
Biblioteka skilli
Programowanie · Integracja z narzędziem

better-auth-integrations

/better-auth-integrations

Podłącza Better Auth do frameworków webowych w TypeScript, takich jak Next.js, SvelteKit, Remix, Express i Hono, przez handlery tras.

Licencja
MIT
Ostatnia zmiana repozytorium
18.07.2026

Ocena i bezpieczeństwo

100/ 100Klasa: dobry
Format25 / 25
Frontmatter z nazwą i opisem, poprawna nazwa, opis do 1024 znaków, nazwa zgodna z folderem.
Odkrywalność25 / 25
Opis mówi, kiedy użyć skilla, ma sensowną długość i jest w 3. osobie.
Treść35 / 35
Co najmniej 150 słów i do 500 linii, nagłówki, listy kroków, przykłady albo kod.
Higiena15 / 15
Bez zaślepek typu TODO, bez ścieżek Windows, z licencją.
Ryzykobrak sygnałów w skanie
Pliki w paczce
4
Skrypty
0
Komentarze HTML
0
Adresy URL w SKILL.md
0
Przestarzałość

Brak sygnałów. Repozytorium zmienione 18.07.2026, bez odwołań do wycofanych modeli i API.

Licencja

MIT, otwarta: można używać i zmieniać, z zachowaniem informacji o autorze.

Co robi i kiedy

Podłącza Better Auth do frameworków webowych w TypeScript, takich jak Next.js, SvelteKit, Remix, Express i Hono, przez handlery tras.

Oryginalny opis (EN)

Better Auth framework integrations for TypeScript. Use when wiring route handlers in Next.js, SvelteKit, Remix, Express, Hono, or other web frameworks.

Jak działa

  1. Goals
  2. Quick start
  3. Cookie handling in Next.js server actions
  4. Guardrails
  5. References
Sekcje z nagłówków SKILL.md, w oryginale · 51 linii, 198 słów
Podgląd SKILL.md
---
name: better-auth-integrations
description: Better Auth framework integrations for TypeScript. Use when wiring route handlers in Next.js, SvelteKit, Remix, Express, Hono, or other web frameworks.
user-invocable: false
disable-model-invocation: true
progressive_disclosure:
  entry_point:
    summary: "Better Auth framework integrations for TypeScript. Use when wiring route handlers in Next.js, SvelteKit, Remix, Express, Hono, or other web frameworks."
    when_to_use: "When implementing authentication, authorization, or security."
    quick_start: "1. Review the core concepts below. 2. Apply patterns to your use case. 3. Follow best practices for implementation."
  references:
    - frameworks.md
    - nextjs.md
---
# Better Auth Integrations

## Goals
- Mount the Better Auth handler at `/api/auth/*` (or a custom base path).
- Use framework helpers where available.
- Ensure cookies and headers flow correctly in SSR and server actions.

## Quick start
1. Create an `auth` instance (see `better-auth-core`).
2. Add a catch-all route for `/api/auth/*`.
3. Use a framework helper (or `auth.handler`) to return a Response.

### Next.js App Router
```ts
import { auth } from "@/lib/auth";
import { toNextJsHandler } from "better-auth/next-js";

export const { GET, POST } = toNextJsHandler(auth);
```

### Next.js Pages Router
```ts
import { auth } from "@/lib/auth";
import { toNodeHandler } from "better-auth/node";

export const config = { api: { bodyParser: false } };
export default toNodeHandler(auth.handler);
```

## Cookie handling in Next.js server actions
Use the `nextCookies` plugin so server actions set cookies correctly.

```ts
import { betterAuth } from "better-auth";
import { nextCookies } from "better-auth/next-js";

export const auth = betterAuth({
  // ...config
  plugins: [nextCookies()],
});
```

## Guardrails
- Keep the base path consistent between server and client.
- Prefer framework helpers when available.
- Avoid running custom body parsers before the auth handler.

## References
- `toolchains/platforms/auth/better-auth/better-auth-integrations/references/nextjs.md`
- `toolchains/platforms/auth/better-auth/better-auth-integrations/references/frameworks.md`
Pliki w paczce (4)
  • SKILL.md 2 KB
  • metadata.json 1 KB
  • references/frameworks.md 1 KB
  • references/nextjs.md 2 KB

Wersje

W bazie nie ma innych skilli o nazwie better-auth-integrations.

Migawka bazy z 28.10.2026 · wersja paczki c7d5ed635a30 (skrót SHA-256 całej paczki)

Zgłoś problem z tym skillem: szkodliwa treść, błędny opis albo prośba autora o usunięcie.

Podobne skille

  • 100better-auth
    Pomaga skonfigurować Better Auth w TypeScript: instancję auth, adaptery, handlery tras, sesje i ciasteczka, wtyczki oraz migrację z NextAuth, Clerk, Auth0 lub Supabase Auth.
  • 95create-auth-skill
    Wdraża uwierzytelnianie w aplikacjach TypeScript i JavaScript z Better Auth: wykrywa framework, konfiguruje adaptery baz danych, handlery tras, dostawców OAuth i strony logowania.
  • 100better-auth-core
    Konfiguruje rdzeń Better Auth w aplikacjach TypeScript: instancję, handlery serwera, instancje klienta, sesje i wywołania API uwierzytelniania po stronie serwera.
  • 100framework-adapters
    Udostępnia oficjalne adaptery @dodopayments/* montujące handlery Checkout, CustomerPortal i Webhooks w Next.js, Express, Fastify, Hono, Astro, Remix, SvelteKit, Nuxt, TanStack, Bun i Convex.
  • 100create-auth
    Dodaje uwierzytelnianie do aplikacji TypeScript lub JavaScript z Better Auth: wykrywa framework, konfiguruje bazę, obsługę tras, dostawców OAuth i strony logowania.
  • 100use-better-auth
    Odpowiada na pytania o better-auth i pomaga budować logowanie, sesje, pluginy oraz adaptery bazy i frameworków.

Uwagi i zgłoszenia

Wiadomość trafi do Bartosza Sokolińskiego. Adres e-mail jest potrzebny tylko do odpowiedzi. Szczegóły w polityce prywatności.