Skip to main content

Action

The following Pre User Registration action denies signups from a forbidden email domain, requires a full name to be submitted, and otherwise stores that name in user_metadata along with a randomly generated identifier in app_metadata.
mock-dependencies.js

Unit Test

The unit tests mock the event and api objects to verify that the forbidden domain is denied, that a missing full name triggers a validation error, and that a valid submission stores the full name and a correctly formatted UUID.
mock-dependencies.spec.js
package.json
mock-dependencies.spec.js
package.json
.mocharc.json
mock-dependencies.spec.js
package.json