One user with ability to login with username/password, SMS OTP, and email OTP

Hi,

Thanks in advance for the help. I realize that there are “similar” topics to this, but none of them answer my question and are outdated by a few years. I’d like to get an up to date answer based on the current state of auth0 features today.

We are looking to allow users to login via username/password OR sms otp OR email OTP. Any one of those would be available for them to choose from. I understand that each of these would result in a new user for each connection type. We also understand that its easy enough to map our application user to all three auth0 users. MI have a few specific questions.

  1. Does linking users support linking 3 users? I see documentation for linking 2 users where a primary and secondary are required, but nothing about 3
  2. Also the documentation states that linking is useful for " * Allows registered users to use a new social or passwordless login but continue using their existing profile". When we link the passwordless user as the secondary, will the token that comes back from authenticating with passwordless now return the primary id?

I was able to get my answer to the first question after finally figuring out how to test. The answer for anyone who is wondering is yes

UPDATE: The answer to the second question is yes

I do have one remaining question. Once I link the accounts, can I get back a new JWT with the primary account id as the sub? Lets say I log in using sms OTP, and I already had an account with email/password. We’d we to link those accounts right away, with the existing account being the primary. However, the token we get back from successful login for the SMS OTP at that time will be for the SMS account, not the primary