Chat Authentication

Hey all,

Having issues getting custom authentication working on Photon Chat (4.1.2.14)

Disconnect reason: custom authentication failed

Checked logs on the custom server we are not even receiving the call, so appears it isn't being send from Photon.

We have successfully managed to get this working on pun with no issues, but the chat doesn't work.

Any ideas greatly appreciated.

Comments

  • Hi @outside,

    Thank you for choosing Photon!
    Version 4.1.2.14 (6. May 2019 - rev5097)
    This looks old.
    Do you use Photon Chat from a separate asset or the one included in PUN?

    Which PUN version?

    Could you share the code you use to authenticate?
  • Hi @JohnTube,

    We use the separate asset for chat, from the asset store.

    Photon.Chat.AuthenticationValues authValues = new Photon.Chat.AuthenticationValues();
    authValues.AuthType = Photon.Chat.CustomAuthenticationType.Custom;
    var user = AzureQuery.Instance.GetPlayerString(m_PlayerLocalData.currentInitData.worldNumber);
    authValues.AddAuthParameter("Data", user);
    authValues.UserId = this.UserName;
    conecting = this.chatClient.Connect(this.chatAppSettings.AppId, "TestChat", authValues);

  • Hi @outside,

    The code looks OK.
    It's weird that mentioned that the server returns custom authentication failure while your authentication endpoint does not receive the request.
    Maybe it's a misconfiguration?
    Could you double check the configuration, URL + RejectIfUnavailable?
    If the issue persists could you send an email to [email protected] with your AppId and region so we take a look at the configuration and server logs if any.