원클릭으로
authentication-logic
Guide to using Better Auth for client and server-side authentication.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
메뉴
Guide to using Better Auth for client and server-side authentication.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
SOC 직업 분류 기준
Documentation for the FastAPI backend, endpoints, and dependency injection.
Overview of the project's tech stack, directory structure, and architectural patterns.
Validates and analyzes Docusaurus MDX chapters for structure, pedagogical quality, and component usage.
Details of the RAG Chatbot, including UI and backend logic.
Interaction with NeonDB Postgres using Drizzle ORM.
Knowledge of the Vercel deployment pipeline, hybrid build scripts, and environment configuration.
| name | Authentication Logic |
| description | Guide to using Better Auth for client and server-side authentication. |
We use Better Auth (better-auth) for identifying users.
lib/auth-client.ts exports authClient.lib/auth.ts exports auth.Use authClient for signing in, signing out, and checking session state in Client Components.
import { authClient } from "@/lib/auth-client";
// Sign In
await authClient.signIn.email({
email,
password,
});
// Social Sign In
await authClient.signIn.social({
provider: "google",
callbackURL: "/onboarding",
});
// Sign Out
await authClient.signOut();
Use auth.api.getSession for protecting API routes or Server Actions.
import { auth } from "@/lib/auth";
import { headers } from "next/headers";
const session = await auth.api.getSession({
headers: await headers()
});
if (!session) {
return new Response("Unauthorized", { status: 401 });
}
textbook/src/components/AuthBar/index.tsx./api/auth/session (Next.js API route proxying Better Auth).