We have two post login actions in a flow, say actionA and actionB.
In actionA, we use the auth0 management api to link user accounts(or we send a request to link user accounts). something like…
await usersManager.link({ id: primary_user_id }, secondaryUserAccount);
In action B, that follows actionA, we expect the user profile to have multiple identities.
we expect event.user.identities.length to be greater than 1, however we see that its 1. When the flow is triggered again, we get the expected result event.user.identities.length = 2.
We are trying to understand that why does the identities array update on the initial flow run? Basically, when does auth0 persist changes to database.