The documentation for Pre User Registration actions states that
@param
value
— The value of the metadata property. This may be set tonull
to remove the metadata property.
However in practice setting a value of null does not remove the property, it sets it to null
api.user.setUserMetadata("full_phone", null);
results in
"user_metadata": {
"first_name": "Test",
"last_name": "User",
"full_phone": null
}
I have tested this on both nodejs16 and 18 runtimes and found the same result.
Is there a way to REMOVE the property in a pre user registration action?
If not will this be supported?
Thanks
n.b. the required behaviour can be achieved with a Pre Reg Hook like so
delete user.user_metadata.full_phone;