We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d9c5895 commit 1999a20Copy full SHA for 1999a20
packages/payload-authjs/src/payload/AuthjsAuthStrategy.ts
@@ -49,7 +49,12 @@ export function AuthjsAuthStrategy(
49
})
50
).docs.at(0);
51
52
+ // If user does not exist in the database, log a warning and return null user
53
if (!payloadUser) {
54
+ payload.logger.warn(
55
+ { name: "payload-authjs (AuthjsAuthStrategy)", session },
56
+ `User '${session.user.id ?? session.user.email}' has a valid Auth.js session but does not exist in the payload database.`,
57
+ );
58
return { user: null };
59
}
60
0 commit comments