Skip to content

Instantly share code, notes, and snippets.

@VulBusters
Last active June 5, 2023 09:31
Show Gist options
  • Save VulBusters/ecf3a87413c37694a39f75e5a31f6924 to your computer and use it in GitHub Desktop.
Save VulBusters/ecf3a87413c37694a39f75e5a31f6924 to your computer and use it in GitHub Desktop.
public class LoginWithEmailPinning
{
public void LoginWithEmail()
{
var loginReq = new LoginWithEmailAddressRequest
{
Email = EmailField.text,
Password = PasswordField.text
};
PlayFab.Internal.PlayFabWebRequest.CustomCertValidationHook = CertPinning.CertCheck;
PlayFabClientAPI.LoginWithEmailAddress(loginReq, OnSuccess, OnError);
}
void OnSuccess(LoginResult result)
{
String s = String.Format("Entity token: {0}", result.EntityToken.EntityToken);
Debug.Log(s);
}
void OnError(PlayFabError error)
{
String s = String.Format("Error message: {0}", error.ErrorMessage);
Debug.Log(s);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment