Skip to content

Commit

Permalink
Update custom sign in getProvider example
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](nextauthjs#6704)
  • Loading branch information
wsfuller committed Feb 13, 2023
1 parent 05fe398 commit 6b46416
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

0 comments on commit 6b46416

Please sign in to comment.