While an PostLogin action is running, when does auth0 persist the changes to user profile

Hi @mattoo.sagar,

Welcome back to the Auth0 Community and sorry for the late reply.

The reason why the identities array is not yet modified in action B is because any changes made to the current user via calling the Management API from an Action does not update the event object for future actions in the flow. This will update the user’s profile but not the event object, since it is a “snapshot” of the state that is captured when the flow begins. So the current information can be obtained only on subsequent logins.

The only exception is when using the built-in Action API object to set metadata , which will update the event object for that specific metadata.

The documentation in reference:

Thanks,
Remus