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:
- 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)
- Set
userMetadata
for theevent.user
if equivalent user was found in the external database - Account Linking process (if merging is possible)