Membership on Authorization does not work when linking Users in Action Flow - Login

Hi, we are currently supporting users to login with multiple identities (Email and Password, Passwordless, or SSO). The login flow looks as follow:

  • We have a login screen in our own app where the user inputs their email
  • Based on this we decide which authorization method the user can use
  • We send the user to the login screen of their method
  • The user log ins and inside the Action Login Flow, we send the event to our backend:
    • We created a user if it does not exists
    • We link the users with the same email automatically if the user logs in with a new Identity
  • Auth0 redirects the user to the add

Here goes the problem. If there is already a Username-Password-Identity for the user (ID starts with “auth0|”) and the user logs in with Passwordless with the “Membership on Authentication” enabled. I still get:

User email|655e1d8c3b40f491640d0a86 is not part of the org_zxJChoJf7gC5kNti organization

My take on the issue is that after the users get linked. There is not longer a user with “email|” id as a member of the organization because the main user_id starts with “auth0”.

Any clue of why this is happening. Auth0 should know that the user is just logging in with a new identity