Skip to content

Update index.ts #13066

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Jun 22, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions packages/next-auth/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ export interface NextAuthResult {
* A universal method to interact with NextAuth.js in your Next.js app.
* After initializing NextAuth.js in `auth.ts`, use this method in Middleware, Server Components, Route Handlers (`app/`), and Edge or Node.js API Routes (`pages/`).
*
* #### In Middleware
* ##### In Middleware
*
* :::info
* Adding `auth` to your Middleware is optional, but recommended to keep the user session alive.
Expand Down Expand Up @@ -167,7 +167,7 @@ export interface NextAuthResult {
* }
* ```
*
* #### In Server Components
* ##### In Server Components
*
* @example
* ```ts title="app/page.ts"
Expand All @@ -179,7 +179,7 @@ export interface NextAuthResult {
* }
* ```
*
* #### In Route Handlers
* ##### In Route Handlers
* @example
* ```ts title="app/api/route.ts"
* import { auth } from "../../auth"
Expand All @@ -189,7 +189,7 @@ export interface NextAuthResult {
* })
* ```
*
* #### In Edge API Routes
* ##### In Edge API Routes
*
* @example
* ```ts title="pages/api/protected.ts"
Expand All @@ -202,7 +202,7 @@ export interface NextAuthResult {
* export const config = { runtime: "edge" }
* ```
*
* #### In API Routes
* ##### In API Routes
*
* @example
* ```ts title="pages/api/protected.ts"
Expand All @@ -219,7 +219,7 @@ export interface NextAuthResult {
* }
* ```
*
* #### In `getServerSideProps`
* ##### In `getServerSideProps`
*
* @example
* ```ts title="pages/protected-ssr.ts"
Expand Down
Loading