Skip to content

Commit 7883e7d

Browse files
authored
Merge pull request #38 from engin-can/engin-can-patch-1
Fix "The following fields are invalid: Email, Username"
2 parents 0113349 + dce08ea commit 7883e7d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/auth-strategy.ts

+1-1
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)