CustomAuthentication - I must be missing something simple...

Options
Hi all.

I've got a steam game, and using CustomAuthentication: I've created an intermediary webservice that is designed to accept parameters from my steam game, pass them to a SteamWebservice, and then return whether or not the game is owned/cracked.

I can hit the webservice through postman, and get back the correctly formatted response. eg:
{ "UserId": null, "ResultCode": 1, "Message": "Spoof Success" }

I am logging every single hit on the webserver, and despite having it set up in photon (I assume) properly: I can't see any hits when I do a test from the game.

Here's what I've got so far:
In the photon dashboard:



Here's what I have in unity before calling "PhotonNetwork.ConnectUsingSettings"
//Set Photon to use our custom authentication type PhotonNetwork.AuthValues = new AuthenticationValues(); PhotonNetwork.AuthValues.AuthType = CustomAuthenticationType.Custom; PhotonNetwork.AuthValues.AddAuthParameter("authticket", _response.m_ticket);



I guess - I'm still a bit confused by the "Allow anonymous clients to connect, independently of configured providers" setting... I assume that this means it will permit a connection that DOESN'T specify a custom auth? This is what I need - because we have a version live that doesn't currently use auth that I still want to support until I push out the new version.

Comments

  • cmy
    Options
    So I started up the sample unity project, and created a new Photon app to test against...
    After digging around, I get the following information in console:
    Operation failed: OperationResponse 230: ReturnCode: 32755 (Custom authentication service error: Error). Parameters: {} Server: NameServer UnityEngine.Debug:LogError(Object) NetworkingPeer:OnOperationResponse(OperationResponse) (at Assets/Photon Unity Networking/Plugins/PhotonNetwork/NetworkingPeer.cs:1567) ExitGames.Client.Photon.PeerBase:DeserializeMessageAndCallback(Byte[]) ExitGames.Client.Photon.EnetPeer:DispatchIncomingCommands() ExitGames.Client.Photon.PhotonPeer:DispatchIncomingCommands() PhotonHandler:Update() (at Assets/Photon Unity Networking/Plugins/PhotonNetwork/PhotonHandler.cs:157)

    This error leads me to believe that my endpoint is non functional, but I can hit my endpoint in PostMan, through a browser directly, and via ajax...

    Why would my endpoint not be consumed properly?
  • JohnTube
    JohnTube ✭✭✭✭✭
    Options
    Hi @cmy,

    Thank you for choosing Photon!

    Does the web service always return null as UserId instead of e.g. a steam ID?
    Did you try to send query string parameter configured i.e. "&testKey=staticTestValue"?
    In Postman did you try GET or POST requests?

    If nothing helps, drops us an email developer@photonengine.com with a link to this discussion and your AppId so we can take a look at the logs if any.
  • cmy
    Options
    1) The service returns a null user id - as stated, I'm not clear what the userId is for. I removed it as an entity in later tests without change...
    2) I don't understand - are you saying I should add those as parameters in my game? I put them there to see if it needed them once I noticed I wasn't getting any hits
    3) In Postman, I'm calling a get... Should I do a post?
  • JohnTube
    JohnTube ✭✭✭✭✭
    Options
    1) The returned UserId will set the UserId of the authenticated player on the server/client.
    2) I'm saying did you produce same test in the game as in postman? I guess you are sending the "authticket" query string parameter but I was asking about the configured key/value on the Photon dashboard as it will be sent too.
    3) No it's fine as it should be GET from the snippet you shared.

    Please send us an email with your AppId and a link to this discussion and to speed up things a link to your auth provider.