-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
feat: migrate to v4 #40
Conversation
This pull request is being automatically deployed with Vercel (learn more). next-auth-example – ./🔍 Inspect: https://vercel.com/nextauthjs/next-auth-example/BX7KU5aofL8TLpuskCuYZKJM3ETZ |
Same deal here, I updated next-auth in this PR to Also in this example in |
I attempted to use this PR and defining an email provider as well as installing nodemailer throws an "adapter undefined" error. Error: Deps: "dependencies": {
"next": "11.1.2",
"next-auth": "^4.0.0-beta.2",
"nodemailer": "^6.6.3",
"pg": "^8.7.1",
"react": "17.0.2",
"react-dom": "17.0.2"
}, Provider Config: providers: [
EmailProvider({
server: process.env.EMAIL_SERVER,
from: process.env.EMAIL_FROM,
}),
], I'm using a mailtrap smtp connection string. FWIW. |
as the message says, you'll need an adapter. 😅 https://next-auth.js.org/adapters/overview @ndom91 we could explain it a bit better in: |
Hah, I did get THAT far. 😂 I installed nodemailer like mentioned above, which is what the docs indicated as the only required "adapter" needed - am I missing something additional to that? Sorry for the noob Q - hopefully this will help clarify some extra points for those that come after. :) |
nodemailer is not an adapter, it is a library that helps you sending emails. an adapter is a way for us to save data in a database. which is a requirement for the Email provider. see the docs link in my previous reply |
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.
Could you update this to use beta.7
To be ready for merge?
…ample into ndom91/update-v4
@balazsorban44 updated the PR to |
@balazsorban44 since updating to |
Migrated everything that needs changed so far.
I did, however, run into one console error regarding
jwt
that I wasn't sure about. Maybe I forgot to migrate something?For example, on the "API" page of the example app, which is supposed to print the current session and jwt info, I get the following in my node console:
On both the normal and typescript example apps btw.
Any idea whats going on there? Did I miss something in terms of the migration?
Obviously there will probably be a few more small things to change before this is really up to snuff for
v4.0.0
(final), but hopefully this takes care of most of the work and then we can merge this PR whenever the day comes tada