Overview
This article explains why the value of the email_verified
attribute cannot be seen in a per-user registration Action when creating a user via the Management API.
Applies To
- Actions
- Pre-user registration
- Email_verified
Cause
This is currently not supported, email_verified
is not listed as part of a Pre-User Registration Action’s event object:
Solution
Consider fetching the email_verified value in a post-user registration or post-login Action instead as a workaround, as these both list email_verified as available within the event object:
If it is essential to be available in the pre-user registration flow, as the user is being created via a management API create user call, duplicate what is being passed for email_verified
as a custom variable in the app_metadata
with a different name.
- For example,
prereg_email_verified
, which will be available in the pre-user registration actions for triggering custom logic.
It is important to use different names for the app_metadata fields to root attribute names to avoid name collision unexpected behaviors.