api.user.setUserMetadata not working with postLogin action

@dan.woda,

I’ve tested the simple code that I’ve sent and I can confirm that it works. My bad for that. However, for a postLogin action that’s doing other stuffs, it seems that calling setUserMetadata does not work similar to the other article that I referenced.

I’ll do another test to provide more information about my issue.

Really appreciated your response.

UPDATE:
Yep, did another round of testing and still doesn’t set the user metadata in the same postLogin action. Here’s the steps of our postLogin action:

  1. Using async.parallel, we’re fetching the following:
  • Fetch auth0 users with the given event.user.email
  • Fetch user from external database if existing (by email)
  1. Set userMetadata for the event.user if equivalent user was found in the external database
  2. Account Linking process (if merging is possible)