Hello everyone,
is there a way to login with E-Mail or Username. I know there is LoginWithPlayFab or LoginWithEmailAdress but I am searching for a method that contains both at the same time. I mean that PlayFab recognizes either the username or the E-Mail from an Input Field, so I can say: Enter the Email or Username to login.
Thank you already in advance for your answer.
Answer by Jay Zuo · Mar 03, 2020 at 05:28 AM
PlayFab does not have such a method built-in. However, you can achieve this by combining LoginWithPlayFab and LoginWithEmailAdress method.
For example, once you get the user input,you can check if the input contains "@" character. If no, then it must not be an email, you can call LoginWithPlayFab. Or, it might be an email, you can try with LoginWithEmailAddress to see if the user can login. If no, then call LoginWithPlayFab again in case the username contains "@" character.