-
-
Notifications
You must be signed in to change notification settings - Fork 295
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
[docs] Add next-auth
v4 example
#3982
Conversation
bharatkashyap
commented
Aug 22, 2024
- Closes Auth.js v4 example #3981
return ( | ||
<SignInPage | ||
providers={providers} | ||
signIn={async (provider, formData, callbackUrl) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would separate this function from the rendering not to mix up the logic with the view so much, makes it more readable. Just personal preference though!
Oh just one more thing does it have to use the Next.js pages router? I thought most examples should just use the app router as it's the most recent one. |
Also, how can I run the example in my development workflow? |
I used the pages router assuming most people using |
For testing during development, the method would be akin to testing the playground apps, i.e.,
Don't know if this merits space in the contributing instructions? |
That's a good point, feel free to stick with that option then, I guess we can't really know for sure what's best for now. |
Probably not super urgent but the current instructions there are about Toolpad Studio only. |
…pad into docs/next-auth-v4
Updated to add instructions to run the playground apps (and examples) for Toolpad Core. I've explored integrating |
CONTRIBUTING.md
Outdated
pnpm dev | ||
``` | ||
|
||
### Test changes to Toolpad Core on a live application |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Isn't this basically the same information as the section above?
CONTRIBUTING.md
Outdated
pnpm --filter playground-nextjs dev | ||
``` | ||
|
||
You should now be able to test changes to Toolpad Core on a live application. Follow similar steps to run apps in the `examples` folder after adding them to the workspace in `pnpm-workspace.yaml`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is the part that should be more step by step and covered in a single section for both Core and Studio in my opinion.
But it's not really related with this PR, we can just create an issue!
Sticking with the pages router should be cool! |