Parse Server option emailVerifyTokenReuseIfValid: true
generates new token on every email verification request
#8886
Labels
state:released
Released as stable version
state:released-alpha
Released as alpha version
state:released-beta
Released as beta version
type:bug
Impaired feature or lacking behavior that is likely assumed
Uh oh!
There was an error while loading. Please reload this page.
New Issue Checklist
Issue Description
The Parse Server option
emailVerifyTokenReuseIfValid: true
generates a new token on every email verification request. This bug was likely introduced with #8212 where using themasterKey
does not provide read access to fields of internal scope, in this case_email_verify_token
,_email_verify_token_expires_at
.The bug has not been noticed due to a weak test case which compares the previous to the new token, but does not check whether a token and expiry date is defined at all; since these fields are not returned anymore by the
masterKey
, the test is comparingundefined
values and passes, even if these values have changed in the DB.parse-server/spec/EmailVerificationToken.spec.js
Lines 928 to 933 in 4aba66c
Steps to reproduce
See failing test in #8885.
Actual Outcome
Token and expiry date are modified.
Expected Outcome
Token and expiry date are not modified.
Environment
Server
7.0.0-alpha.5
The text was updated successfully, but these errors were encountered: