apostrophe icon indicating copy to clipboard operation
apostrophe copied to clipboard

Copy paste error in login module for "uponSubmit" requirements

Open chmdebeer opened this issue 3 months ago • 4 comments

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:

  1. Create a uponSubmit login requirement
  2. Test to see if it is executed and it will show that it is never applied

chmdebeer avatar Sep 04 '25 05:09 chmdebeer

Thanks for this report!

BoDonkey avatar Sep 04 '25 09:09 BoDonkey

Hey is anyone working on this?

shivam-taneja avatar Sep 08 '25 14:09 shivam-taneja

Yes, a PR is in review: https://github.com/apostrophecms/apostrophe/pull/5060

boutell avatar Sep 08 '25 14:09 boutell

This PR has landed and will be in the next release - early October.

BoDonkey avatar Sep 17 '25 14:09 BoDonkey