-
-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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
Missing TS example of custom signin page #6549
Comments
Hey, can I take this issue? I will write the example in typescript as well. |
I would just prefer if we convert the code examples on https://next-auth.js.org/configuration/pages to TS for simplicity, there's even an |
Hey @balazsorban44, I went through the To convert, the code examples to TS we first have to create a proper type variable and then export the type variable. Please let me know if I am wrong. |
This is the only file needing an edit: https://github.com/nextauthjs/next-auth/edit/v4/docs/docs/configuration/pages.md To be honest, @f98pno could you clarify exactly which block on that page caused issues for you with TypeScript? Most are very straightforward snippets. |
isn't infering from getServerSideProps enough? the props we pass from there is already typed. function SignIn({ providers }: InferGetServerSidePropsType<typeof getServerSideProps>) Just adding the above shall be enough, I suppose and like @balazsorban44 said, everything else is pretty straightforward. |
Yeah, let's do that then, if OP does not comment on anything else, I'm inclined to close this issue with the above suggestion merged. |
i guess, this issue is applicable for new docs as well (main branch) on https://authjs.dev/guides/basics/pages . |
Not necessary, as the new docs are being rewritten from scratch. 👍 Thanks for the PR! |
What is the improvement or update you wish to see?
Would it be possible to get the example of pages/auth/signin.js provided on this page:
https://next-auth.js.org/configuration/pages
in Typescript as well?
Is there any context that might help us understand?
I am working on my first full application using https://create.t3.gg/ and would like to create my own NextAuth signing page in a typesafe way, but found the documentation about this just to cover JS.
Does the docs page already exist? Please link to it.
No response
The text was updated successfully, but these errors were encountered: