Hi guys,
I followed up your instructions on webhooks and Photon and still don't get one point. Right now I'm doing the following:
private void AuthenticateWithPhoton(GetPhotonAuthenticationTokenResult obj) { LogMessage("Photon token acquired: " + obj.PhotonCustomAuthenticationToken + " Authentication complete."); //We set AuthType to custom, meaning we bring our own, PlayFab authentication procedure. var customAuth = new AuthenticationValues { AuthType = CustomAuthenticationType.Custom }; //We add "username" parameter. Do not let it confuse you: PlayFab is expecting this parameter to contain player PlayFab ID (!) and not username. customAuth.AddAuthParameter("username", _playFabPlayerIdCache); // expected by PlayFab custom auth service //We add "token" parameter. PlayFab expects it to contain Photon Authentication Token issues to your during previous step. customAuth.AddAuthParameter("token", obj.PhotonCustomAuthenticationToken); //We add "token" parameter. PlayFab expects it to contain Photon Authentication Token issues to your during previous step. // customAuth.AddAuthParameter("NickName", obj.PhotonCustomAuthenticationToken); customAuth.UserId = _playFabPlayerIdCache; //We finally tell Photon to use this authentication parameters throughout the entire application. PhotonNetwork.AuthValues = customAuth; // ShowMenu }
Before I put in Username and Password and authentication worked. But how do I now set the PhotonNetwork.playerName proprely? I have a displayName also, and in another Script I used:
string PlayFabName = resultData.PlayerProfile.DisplayName; PhotonNetwork.playerName = PlayFabName;
But I think this isn't the right thing to go? I wanted to do something like this:
customAuth.AddAuthParameter("NickName", obj.InfoResultPayload.AccountInfo.TitleInfo.DisplayName);
What I want to achieve is that a hacked client cannot change his PhotonNetwork.playerName to some name that's already existing in my database.
Thanks,
Dario