diff --git a/src/auth-strategy.ts b/src/auth-strategy.ts index 6927f37..ae3e511 100644 --- a/src/auth-strategy.ts +++ b/src/auth-strategy.ts @@ -52,7 +52,7 @@ export const createAuthStrategy = ( let user: User | null = null; if (pluginOptions.useEmailAsIdentity) { - if (typeof jwtUser.email !== "string") { + if (!jwtUser.email || typeof jwtUser.email !== "string") { payload.logger.warn( "Using email as identity but no email is found in jwt token", );