next-auth credential doesnt invoke the session callback, though google/github provider does #3787
Unanswered
anirbanchowdhury
asked this question in
Help
Replies: 3 comments
-
Any ideas on this one ? |
Beta Was this translation helpful? Give feedback.
0 replies
-
also having this issue |
Beta Was this translation helpful? Give feedback.
0 replies
-
Since you're using session: {
jwt: true,
} To-be: session: {
strategy: "jwt",
} See upgrade guide. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Question 💬
Both github provider and credential (via checking a Mysql db) works. .
As per documentation, Session is not automatically persisted out of the box when it comes to CredentialProvider which is all good.
However, the session callback doesnt get invoked when it comes to CredentialProvider i.e it still queries the database, obviously doesnt find the session and thus the redirect url thinks there is no session.
Using next-auth(4.1.2) with Prisma(3.9.0)
How do I stop the session database query for Credential but continue using it for google/other providers ?
[...nextauth].js
index.tsx
_app.tsx
Google authentication logs
Credential Auth logs
How to reproduce ☕️
[...nextauth].js
index.tsx
_app.tsx
Beta Was this translation helpful? Give feedback.
All reactions