photon server Custom Authentication

riovoxtools
edited June 2022 in Photon Server

Problem:

I can't get any callback such as :OnCustomAuthenticationFailed ,OnCustomAuthenticationResponse, it seem that photon server Custom Authentication is not work.

Please help, our project's deadline is comming soon, but i encounter this problem.

  1. I use the newest photon v1 PUN (v1.105 )and the newest photon server v5 r1 to test the Custom Authentication.

I use DemoFriends-Scene as the client, and use the photon server v5 r1 as the server.

we didn't modify any server code.

(if I use photon server v4, all is work normaly, it seems that this problem only exist in photon server v5)


2. client code:

 PhotonNetwork.AuthValues = new AuthenticationValues();

PhotonNetwork.AuthValues.AuthType = CustomAuthenticationType.Custom;

 PhotonNetwork.AuthValues.UserId = authName;

         if (!string.IsNullOrEmpty(authToken))

            PhotonNetwork.AuthValues.SetAuthPostData(JsonUtility.ToJson(new AuthRequest { token = authToken }));

PhotonNetwork.ConnectUsingSettings("1.0");

3. Server config (Nameserver.xml.config):

<CustomAuth Enabled="true" AllowAnonymous="false">

   <UseCustomAuthService>false</UseCustomAuthService>

   <AuthProviders>

    <AuthProvider Name="Custom"

           AuthenticationType="0"

                      AuthUrl="..."

           secret="customauthsecret" />

Answers

  • We will get back in your tickets.

  • _mra
    _mra
    edited June 2022

    Same for me - we use already tested PUN app - switched to server v5 and server dont call URL and dont return UserId


    tested on v4 - v4 works fine!

  • Stefan
    Stefan mod
    edited June 2022

    Please contact us at developer@photonengine.com and send us more details.

This discussion has been closed.