Hi,
I tried to fetch user metadata as well as app metadata as part of access token Using Actions Library options. I tried in rules its working fine, but In case Of the Action it’s not working. Can anyone suggest the solution? Is there anything I need to enable it? Refer the sample code attached it. I have referred the code from this link
exports.onExecutePostLogin = async (event, api) => {
const userEmail = event.user.email;
const userId = event.user.user_id;
// This property will never be undefined in Actions.
const userAppMetadata = event.user.app_metadata;
// ... additional code
};