Skip to content

Commit

Permalink
fix: fix typos and usage errors of next auth (#778)
Browse files Browse the repository at this point in the history
Co-authored-by: imWildCat <[email protected]>
  • Loading branch information
imWildCat and imWildCat authored Sep 20, 2024
1 parent 5d88233 commit c2b5c12
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions docs/quick-starts/framework/next-auth/_config-provider.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,11 @@ import SignInFlowSummary from '../../fragments/_web-sign-in-flow-summary.mdx';
redirectUri="http://localhost:3000/api/auth/callback/logto"
/>

#### Config Next Auth provider
#### Set up Next Auth provider

<GetAppSecret />

Modify your API route config of Next Auth, if you are using Pages Router, the file is in `pages/api/auth/[...nextauth].js`, if you are using App Router, the file is in `app/api/auth/[...nextauth]/router.ts`.
Modify your API route config of Next Auth, if you are using Pages Router, the file is in `pages/api/auth/[...nextauth].js`, if you are using App Router, the file is in `app/api/auth/[...nextauth]/route.ts`.

The following is an example of App Router:

Expand All @@ -33,7 +33,12 @@ The following is an example of App Router:
```ts
import NextAuth from 'next-auth';

export const { handlers, signIn, signOut, auth } = NextAuth({
export const {
handlers: { GET, POST },
signIn,
signOut,
auth,
} = NextAuth({
providers: [
{
id: 'logto',
Expand Down

0 comments on commit c2b5c12

Please sign in to comment.