Overview
This article explains how to delete a property from a User’s metadata using a Post-Login Action.
Applies To
- user_metadata
- app_metadata
- Actions
Solution
This can be achieved by using a Post Login Trigger.
Set the property to null using code similar to the example below:
exports.onExecutePostLogin = async (event, api) => {
api.user.setUserMetadata("colour", null);
};