"Allow anonymous clients to connect, independently of configured providers." - has no effect

Options
For security reasons we are trying to implement custom authentication logic. Seems like every thing works well but check mark "Allow anonymous clients to connect, independently of configured providers." has no effect! Using auth parameters we successfully receive success/fail callbacks, but uncheck anonymous access has no affect at all. Still available to join anonymously without setting auth values and pass through photon network. Is it a bug? For testing purposes we made new application for implementing auth feature for not breaking live app. Is that option really not working or allowed only in purchased products?

Comments

  • JohnTube
    JohnTube ✭✭✭✭✭
    edited January 2019
    Options
    Hi @LevityPlay,

    That option works as expected and is used by live applications.
    Updating application settings takes few minutes to be applied.

    That being said, could you give us minimal repro steps.
    What is the client code you use to test this?
  • LevityPlay
    edited January 2019
    Options
    Before connecting to photon I'm using those settings:
            PhotonNetwork.AuthValues = new AuthenticationValues(PhotonNetwork.playerName);
            PhotonNetwork.AuthValues.AuthType = CustomAuthenticationType.Custom;
            PhotonNetwork.AuthValues.UserId = GlobalPlatformUserId;
            PhotonNetwork.AuthValues.AddAuthParameter("build",BuildVersion);
            PhotonNetwork.AuthValues.AddAuthParameter("protocol", ProtocolVersion);
            PhotonNetwork.AuthValues.AddAuthParameter("userid", UserId);
            PhotonNetwork.AuthValues.AddAuthParameter("nickname", NickName);
            PhotonNetwork.AuthValues.AddAuthParameter("accessToken", AccessToken);
    
            PhotonNetwork.autoJoinLobby = true;
            PhotonNetwork.automaticallySyncScene = false;
            PhotonNetwork.PhotonServerSettings.HostType = ServerSettings.HostingOption.BestRegion;
            PhotonNetwork.PhotonServerSettings.Protocol = ExitGames.Client.Photon.ConnectionProtocol.Udp;
            PhotonNetwork.PhotonServerSettings.RunInBackground = true;
    
            PhotonNetwork.ConnectUsingSettings(ProtocolVersion);
    After that, in client side all auth callbacks work fine. But if simply skip part with PhotonNetwork.AuthValues it connects to photon server with "anonymous check mark" unchecked.
  • JohnTube
    JohnTube ✭✭✭✭✭
    Options
    But if simply skip part with PhotonNetwork.AuthValues it connects to photon server with "anonymous check mark" unchecked.
    Could you provide the code for this part only. What UserId does the client get?
  • LevityPlay
    edited January 2019
    Options
    JohnTube said:

    But if simply skip part with PhotonNetwork.AuthValues it connects to photon server with "anonymous check mark" unchecked.
    Could you provide the code for this part only. What UserId does the client get?
    Technically it does not matter. As we are using multiple platforms (oculus/viveport/steam), ID is taken from SDK and simply add string with platform name to avoid duplicate ID's. All auth values are strings. To reproduce simply use:
    
            PhotonNetwork.autoJoinLobby = true;
            PhotonNetwork.automaticallySyncScene = false;
            PhotonNetwork.PhotonServerSettings.HostType = ServerSettings.HostingOption.BestRegion;
            PhotonNetwork.PhotonServerSettings.Protocol = ExitGames.Client.Photon.ConnectionProtocol.Udp;
            PhotonNetwork.PhotonServerSettings.RunInBackground = true;
    
            PhotonNetwork.playerName = platform + "_" + platformUserId;
            PhotonNetwork.ConnectUsingSettings(ProtocolVersion);
    
  • JohnTube
    JohnTube ✭✭✭✭✭
    edited January 2019
    Options
    Hi @LevityPlay,

    Our tests show that custom auth works as expected when anonymous login is disabled.
    Send an email to developer@photonengine.com with your AppId and AppVersion, description of the issue and link to this forum discussion.
    We will take a look at the logs and config then try to reproduce with your AppId.
  • LevityPlay
    Options
    Seems like when our server proceed authorization without extra data on client side OnCustomAuthenticationResponse not called.
  • JohnTube
    JohnTube ✭✭✭✭✭
    Options
    Hi @LevityPlay,

    I don't understand your last comment.
    Did you fix the issue on your side?
  • LevityPlay
    Options
    Yes, that was my mistake. With unchecked mark, request been proceeded through our server which allows access. But misunderstood thing was that Photon callback on client side has hot been called. And the reason is that server response had not have "Data" object. Looks like logical bug, because it is necessary to know that authentication proceeded or not.