-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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
Can't get next-auth email provider to work with nodemailer #128
Comments
I've also been having next-auth issues and just made #133 documenting mine, maybe ours are similar? |
I have the same issue. I don't think EmailProvider supports edge, which makes this implementation challenging because tmk, An example using |
Facing the exact same issue using
is there a fix for this? |
@mundia416 see #133 for hack-around solution. Not ideal, but I believe you can get it to work by using the mentioned manual next-auth release. |
Does email work at all with this?
To the providers, I get
|
Ran into this issue too. What a shame. |
Let's continue this conversation on the NextAuth.js repo – this template won't be adding nodemailer, and sounds like a more general question around integrating those two together. Thank you. |
@maddo7 It seems like a typing issue only, so you can force the typing.
|
As a (temporary) solution, you can render everything server side instead of on edge.
@leerob Can you link to the topic on the nextauth.js repo where this is discussed? |
Same issue here. Did anybody solve it with nodemailer? Server Error |
For what its worth I made it work by implementing an HTTP based email provider: https://next-auth.js.org/tutorials/securing-pages-and-api-routes my providers:
Then the middleware worked |
how would you protect routes if there is no middleware provided |
I fixed this by having two auth configurations, one for auth-client and another for auth-server. The configurations that are critical to the server, like EmailProvider, are put into auth-server. which makes sense; those details are sensitive and should not be exposed to the client. You need to then go to all pages (like the api folder, etc.) that need server-side auth verification and point to auth-server. |
pixelcatgg, did you end up making it work with an HTTP based email provider? |
Nodemailer seems to be not compatible with edge?
I get this error if I try to implement Email Provider in auth.ts.
Error:
Code:
package.json
The text was updated successfully, but these errors were encountered: