Skip to content

Commit dce08ea

Browse files
authored
Fix "The following fields are invalid: Email, Username"
1 parent 0113349 commit dce08ea

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/auth-strategy.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ export const createAuthStrategy = (
5252
let user: User | null = null;
5353

5454
if (pluginOptions.useEmailAsIdentity) {
55-
if (typeof jwtUser.email !== "string") {
55+
if (!jwtUser.email || typeof jwtUser.email !== "string") {
5656
payload.logger.warn(
5757
"Using email as identity but no email is found in jwt token",
5858
);

0 commit comments

Comments
 (0)