"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?
0
Comments
-
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?0 -
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.0 -
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?0
-
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: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?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);
0 -
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.0 -
Seems like when our server proceed authorization without extra data on client side OnCustomAuthenticationResponse not called.0
-
0
-
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.0