Next.js Discord

Discord Forum

Auth.js sessions

Answered
West African Lion posted this in #help-forum
Open in Discord
Avatar
West African LionOP
Hello everyone, I'm using the credentials provider from auth.js as well as a php api and I'm trying to add the id field to the sessions but the user is undefined in the session callback, shouldn't the user param be the same as the user returned from the signin auth.js function? if not, what's the approach to populate it?
Answered by West African Lion
well, auth.js doesn't support the credentials provider with a database strategy so using sessions from database is not supported.
View full answer

3 Replies

Avatar
West African LionOP
this is my auth.ts
Image
.
Image
Avatar
West African LionOP
well, auth.js doesn't support the credentials provider with a database strategy so using sessions from database is not supported.
Answer