Hello! I am trying to add a check for a particular field that exists in user_metadata
. I want to add this check in an on password-change action. For some reason the User
Object in the Action Test section is this and it;s missing the user_metadata
"user": {
"id": "SOME_ID",
"user_id": "899898",
"email": "someemail@this.com",
"email_verified": true,
"last_password_reset": "2022-03-10T19:08:03.417Z",
"username": "some smith"
}
instead of the full-blown
"user": {
"app_metadata": {},
"created_at": "2022-03-10T19:13:33.919Z",
"email_verified": true,
"email": "someemail@this.com",
"family_name": "some",
"given_name": "smith",
"identities": [
{
"connection": "Username-Password-Authentication",
"isSocial": false,
"provider": "auth0",
"userId": "123",
"accessToken": "",
"profileData": {},
"user_id": "5f7c8ec7c33c6c004bbafe82"
}
],
"last_password_reset": "2022-03-10T19:13:33.919Z",
"name": "somesmith",
"nickname": "j+smith",
"phone_number": "18882352699",
"phone_verified": false,
"picture": "http://www.gravatar.com/avatar/?d=identicon",
"updated_at": "2022-03-10T19:13:33.919Z",
"user_id": "auth0|5f7c8ec7c33c6c004bbafe82",
"user_metadata": {},
"username": "somesmith",
"multifactor": []
}
I am not sure how to get the user_metadata
field in that object.
Also, what would be an alternative solution to check for user_metadata
in an action?