Skip to content

Commit

Permalink
docs: Update custom sign in getProvider example (#6706)
Browse files Browse the repository at this point in the history
According to the function declaration for [getProviders()](https://github.com/nextauthjs/next-auth/blob/v4/packages/next-auth/src/react/index.tsx#L187) it doesn't accept any parameters. Therefore have removed passing of an argument in the doc example.

Using the documentation as is will result in multiple type errors as [referenced in an issue I've posted about](#6704)
  • Loading branch information
wsfuller authored Feb 13, 2023
1 parent cf810f2 commit 9e423f3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions docs/docs/configuration/pages.md
Original file line number Diff line number Diff line change
Expand Up @@ -107,10 +107,10 @@ export async function getServerSideProps(context: GetServerSidePropsContext) {
return { redirect: { destination: "/" } };
}

const providers = await getProviders(context);
const providers = await getProviders();

return {
props: { providers: Object.values(providers) ?? [] },
props: { providers: providers ?? [] },
}
}
```
Expand Down

1 comment on commit 9e423f3

@vercel
Copy link

@vercel vercel bot commented on 9e423f3 Feb 13, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.