-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
Adds Fullstack Nextjs Auth Tutorial #18092
base: production
Are you sure you want to change the base?
Adds Fullstack Nextjs Auth Tutorial #18092
Conversation
Please let me know if any changes need to be made. Thanks! |
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.
2 files reviewed, 3 total issue(s) found.
Note: We resolved prior Hyperlint review comments because:
We updated our inline suggestion AI.
We do this to avoid keeping outdated or irrelevant comments around. We'll leave a new review with current comments below.
...cs/developer-spotlight/tutorials/fullstack-authentication-with-next-js-and-cloudflare-d1.mdx
Outdated
Show resolved
Hide resolved
...cs/developer-spotlight/tutorials/fullstack-authentication-with-next-js-and-cloudflare-d1.mdx
Show resolved
Hide resolved
...cs/developer-spotlight/tutorials/fullstack-authentication-with-next-js-and-cloudflare-d1.mdx
Outdated
Show resolved
Hide resolved
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.
Hey @mackenly, thank you for this great tutorial! I have reviewed it and left a few comments. At it's current state, I was not able to run it successfully. The reason being the table not getting created at all. In the comments, you will find more details.
...cs/developer-spotlight/tutorials/fullstack-authentication-with-next-js-and-cloudflare-d1.mdx
Outdated
Show resolved
Hide resolved
...cs/developer-spotlight/tutorials/fullstack-authentication-with-next-js-and-cloudflare-d1.mdx
Outdated
Show resolved
Hide resolved
...cs/developer-spotlight/tutorials/fullstack-authentication-with-next-js-and-cloudflare-d1.mdx
Outdated
Show resolved
Hide resolved
...cs/developer-spotlight/tutorials/fullstack-authentication-with-next-js-and-cloudflare-d1.mdx
Show resolved
Hide resolved
|
||
Auth.js provides integrations for many different credential providers such as Google, GitHub, etc. For this tutorial we're going to use Resend magic links. | ||
|
||
Before continuing, either choose an alternative credential provider or ensure you have a domain and API key from Resend. |
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.
Can we move this to pre-requisites? For development purposes, is configuring the domain required?
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.
@harshil1712 Moved. Unfortunately, they don't provide a default sending domain.
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.
If preferred, I could change to using Passkeys or username/pass, which wouldn't require a 3rd party service: https://authjs.dev/getting-started/authentication/webauthn
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.
Moving off from Resend might be more work. Let's stick to it. I would hate for you to do more work. I have used Resend, in the development I always use [email protected]
as the from email. For the to email, I use the email I used to Sign-Up with Resend. This way I don't need to setup a domain. Maybe, you can try this? We can add a note mentioning that to use in production, one needs to configure the domain.
|
||
You'll need to run this once on your production database to create the necessary tables. If you're following along with this tutorial, we'll run it together in a few steps. | ||
|
||
:::note[Clean up] |
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.
Won't it be better to create the table using the wrangle d1 execute command instead? This way, the user doesn't have to remove the api and re-deploy the app again
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.
@harshil1712 I do agree that this would be more seamless, but there's also a trade off of keeping the tutorial updated with any changes. The adapter docs do recommend using the up() method or we could copy the SQL from here. I can't think of a good way to dynamically pull that. Open to whichever direction you think would align best with the doc styles.
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.
In that case, let's use the up()
method as you suggested.
...cs/developer-spotlight/tutorials/fullstack-authentication-with-next-js-and-cloudflare-d1.mdx
Outdated
Show resolved
Hide resolved
...cs/developer-spotlight/tutorials/fullstack-authentication-with-next-js-and-cloudflare-d1.mdx
Show resolved
Hide resolved
...cs/developer-spotlight/tutorials/fullstack-authentication-with-next-js-and-cloudflare-d1.mdx
Show resolved
Hide resolved
...cs/developer-spotlight/tutorials/fullstack-authentication-with-next-js-and-cloudflare-d1.mdx
Outdated
Show resolved
Hide resolved
@harshil1712 I'll take a look and address feedback items. Thanks! |
...cs/developer-spotlight/tutorials/fullstack-authentication-with-next-js-and-cloudflare-d1.mdx
Show resolved
Hide resolved
…gnostic component
Hey @mackenly, please let me know if it is ready for review |
@harshil1712 A few outstanding feedback follow-up questions. If you can, take a look at these, and let me know next steps:
|
Hey @mackenly, |
Summary
Developer Spotlight Tutorial
Contact with Daniel Benhamou
Documentation checklist