ऑराबेस लोगो
aurabaseडॉक्स
डॉक्स›जावास्क्रिप्ट एसडीके संदर्भ›Next.js reference

JavaScript SDK: Next.js reference

Protect Next.js routes and read the signed-in user on the server (App Router).

6 मि॰ पढ़ें·स्तर संदर्भ·12 अक्टू॰ 2026 पर संशोधित
यह पेज अभी तक आपकी भाषा में उपलब्ध नहीं है. इसे अंग्रेजी में दिखाया गया है.
यह अंग्रेजी पाठ फ़्रेंच मूल से स्वचालित रूप से उत्पन्न हुआ था और अभी तक इसकी समीक्षा नहीं की गई है।
#
कार्य

Exported functions

FunctionDescription
function createAuthMiddleware(options?: AuthMiddlewareOptions): (request: NextRequestLike) => Promise<NextResponseLike>Creates a standard Next.js middleware that validates sessions and protects private routes.
function auth(options?: { projectUrl?: string; apiKey?: string; }): Promise<{ userId: string | null; user: User | null; session: Session | null; }>Server Component helper (Clerk-like API) to get the current authentication state.
function currentUser(options?: { projectUrl?: string; apiKey?: string; }): Promise<User | null>Server Component helper to get the currently logged-in user profile.
function createClientForServerComponent(cookieStore: ReadonlyRequestCookiesLike, projectUrl?: string, apiKey?: string): AuraClient<any, any>Creates an Aurabase client optimized for React Server Components (RSC).
function createClientForServerAction(cookieStore: ReadonlyRequestCookiesLike, projectUrl?: string, apiKey?: string): AuraClient<any, any>Creates an Aurabase client for Server Actions and Route Handlers.
Generated page

This page is generated from the type declarations and comments of the SDK, so it cannot drift from the published code. For worked examples, read the guides.