i followed a playfab auth tutorial and it worked pretty well but i cant seem to register with any other accounts, only 1 account of mine is able to login while i get this error when trying to login with any other (existing) gmail accounts /Client/LoginWithEmailAddress: User not found
some parts of my script:
public void OnClickLogin() { var request = new LoginWithEmailAddressRequest { Email = userEmail, Password = userPass }; PlayFabClientAPI.LoginWithEmailAddress(request, OnLoginSuccess, OnError); } void OnLoginSuccess(LoginResult result) { PlayerPrefs.SetString("EMAIL", userEmail); PlayerPrefs.SetString("USERNAME", username2); PlayerPrefs.SetString("PASSWORD", userPass); loginPanel.SetActive(false); MenuManager.Instance.OpenMenu("title"); } void OnLoginFailure(PlayFabError error) { var registerRequest = new RegisterPlayFabUserRequest { Email = userEmail, Password = userPass, Username = username2 }; PlayFabClientAPI.RegisterPlayFabUser(registerRequest, OnRegisterSuccess, OnRegisterFailure); } void OnRegisterSuccess(RegisterPlayFabUserResult result) { Debug.Log("successfully registered"); PlayerPrefs.SetString("EMAIL", userEmail); PlayerPrefs.SetString("PASSWORD", userPass); PlayerPrefs.SetString("USERNAME", username2); loginPanel.SetActive(false); MenuManager.Instance.OpenMenu("title"); } void OnRegisterFailure(PlayFabError error) { Debug.Log("failed to register"); Debug.LogError(error.GenerateErrorReport()); }
Answer by Made Wang · Apr 19 at 10:16 AM
In line 4, the error callback for the login request is OnError, and the function on line 17 is OnLoginFailure, which means the register process will never start. Please correct the function name for the error callback.