Skip to main content

Action

The following Password Reset Post Challenge action redirects the user to an external identity verification page when their risk score exceeds a threshold, then validates the returned session token and verification result before allowing the password reset to continue.
mock-redirects.js

Unit Test

The unit tests mock the event and api objects, along with the redirect token encoding and validation, to verify the redirect only fires above the risk threshold and that access is denied for invalid tokens, mismatched users, or incomplete verification.
mock-redirects.spec.js
package.json
mock-redirects.spec.js
package.json
.mocharc.json
mock-redirects.spec.js
package.json