#loginAttempts "NaN" when logging in

2 messages · Page 1 of 1 (latest)

lofty inlet
#

When trying to login with email + password, with payload local through nextjs server actions, I get this error:

 CastError: Cast to Number failed for value "NaN" (type number) at path "loginAttempts"
    at async submitLoginForm (src\actions\login.ts:26:14)
  24 |
  25 |  try {
> 26 |          const res = await payload.login({
     |                     ^
  27 |                  collection: 'users',
  28 |                  data: {
  29 |                          email: data.email, {
  stringValue: '"NaN"',
  messageFormat: undefined,
  kind: 'Number',
  value: NaN,
  path: 'loginAttempts',
  reason: AssertionError [ERR_ASSERTION]: false == true
cosmic rootBOT