Photon Custom Authentication POST HTTPS

Options
We got an issue with the HTTPS connection using POST and custom authentication.

While our custom authentication is working fine with POST and HTTP it will not work with HTTPS, our configuration looks like this:
<AuthProvider Name="Custom"
                    AuthenticationType="0"
                    AuthUrl="http://domain.com/api/authenticate"
                    RejectIfUnavailable = "true"
                    secret="mycode" />
    </AuthProviders>

as soon as we change "http://domain.com/api/authenticate&quot; to "https://domain.com/api/authenticate&quot; photon will not sent any request to our NGINX Server, and our application does not register any request - while it works fine again if we change HTTPS back to HTTP.

The authentication api is accessible on HTTPS and HTTP.

Regards
Christoph

Comments

  • JohnTube
    JohnTube ✭✭✭✭✭
    Options
    Hi @Christoph_ ,

    Thank you for choosing Photon!

    Upgrade to Photon v5 as this is a known issue with new TLS versions not supported in v4.
    @chvetsov can confirm and give you more details.
  • Christoph_
    edited May 2020
    Options
    JohnTube wrote: »
    Hi @Christoph_ ,

    Thank you for choosing Photon!

    Upgrade to Photon v5 as this is a known issue with new TLS versions not supported in v4.
    @chvetsov can confirm and give you more details.

    Thank you, it works.

    Unfortunately our response does not work anymore, Photon throws the following issue in Unity.

    OperationResponse 230: ReturnCode: 32755 (Custom authentication deserialization failed: One of the identified items was in an invalid format.). Parameters: {} Server: MasterServer Address: xx.xx.xx:5055
    UnityEngine.Debug:LogError(Object)
    Photon.Realtime.LoadBalancingClient:DebugReturn(DebugLevel, String) (at Assets/Photon/PhotonRealtime/Code/LoadBalancingClient.cs:2297)
    Photon.Realtime.LoadBalancingClient:OnOperationResponse(OperationResponse) (at Assets/Photon/PhotonRealtime/Code/LoadBalancingClient.cs:2371)
    ExitGames.Client.Photon.PeerBase:DeserializeMessageAndCallback(StreamBuffer)
    ExitGames.Client.Photon.EnetPeer:DispatchIncomingCommands()
    ExitGames.Client.Photon.PhotonPeer:DispatchIncomingCommands()
    Photon.Pun.PhotonHandler:Dispatch() (at Assets/Photon/PhotonUnityNetworking/Code/PhotonHandler.cs:205)
    Photon.Pun.PhotonHandler:FixedUpdate() (at Assets/Photon/PhotonUnityNetworking/Code/PhotonHandler.cs:139)


    This is the response that worked with the prior version:

    {
    "ResultCode": "1",
    "UserId": 21,
    "Nickname": "Christoph"
    }

    Has something changed between these versions?

    Regards
    Christoph
  • JohnTube
    JohnTube ✭✭✭✭✭
    Options
    We changed Newtonsoft.JSON version, change ResultCode to a number.
  • Christoph_
    Options
    Thank you for the support, it works great.