Copy paste error in login module for "uponSubmit" requirements
In the login module, index.js, the filterRequirements function filters for three phases.
The uponSubmit filter is:
onTimeRequirements: Object.fromEntries(requirements.filter(requirement => requirement.phase === 'uponSubmit')),
and it should be:
onTimeRequirements: Object.fromEntries(requirements.filter(([ , requirement ]) => requirement.phase === 'uponSubmit')),
To Reproduce
Step by step instructions to reproduce the behavior:
- Create a uponSubmit login requirement
- Test to see if it is executed and it will show that it is never applied
Thanks for this report!
Hey is anyone working on this?
Yes, a PR is in review: https://github.com/apostrophecms/apostrophe/pull/5060
This PR has landed and will be in the next release - early October.