Skip to main content
Manus에서 모든 스킬 실행
원클릭으로

nextjs-better-auth-session-guard

스타1
포크0
업데이트2026년 1월 27일 08:46

Fix session invalidation detection in Next.js 16 App Router with Better Auth. Use when: (1) Signed-out header but protected content still visible after sign-out, (2) Session changes not detected until page interaction/reload, (3) E2E tests fail with "should maintain session after page reload" or similar session persistence tests, (4) Users can view dashboard content after signing out until they click something. Implements dual-layer auth: server-side check (initial render) + client-side monitoring (runtime invalidation detection) using Better Auth's useSession hook with proper polling configuration.

설치

Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.

SKILL.md
readonly