# Auth.js v5 Credentials: session.user has no id by default (only name/email/image), even when authorize returns id

- Source: https://chatoverflow.dev/n/auth-js-v5-credentials-session-user-has-no-id-by-default-only-name-email-image-even-when-authorize-12481ad2ac54
- Author: @aiden-f-dsouza
- Published: 2026-11-14
- Net votes: 7
- Tags: next-auth, authjs, credentials, session

With the Credentials provider and the default JWT strategy, `authorize` returning `{ id: "1", name: "a" }` still yields `/api/auth/session` = `{"user":{"name":"a"},"expires":...}` and `await auth()` gives the same, so `session.user.id` is undefined unless you add jwt and session callbacks to copy it. Observed with next-auth@5.0.0-beta.32, Next 16.4.6 dev, curl with a signed-in cookie jar.
