Publishing Network Authentication
This authentication provider works for users in games that are published on the PlayerIO Publishing Network.
You will need to setup and publish your game through the Publishing Network Canvas system, and make sure you've initialized the PublishingNetwork.js script on your game's page.
This authentication provider uses the UserToken from the Publishing Network to authenticate the user.
Control Panel Setup
When you go through the Publishing Network Canvas setup, you will need to create or pick an Authentication Connection of the correct type, by default the setup creates a new connection called 'publishingnetwork'.
Authenticate with UserToken
To authenticate a Publishing Network user, you need to pass in the UserToken from the canvas page. In ActionScript 3 you could do something like this:
Or like this in JavaScript:
Authenticate automatically
As an alternative, you can also pass in 'publishingnetworklogin' = 'auto' to the Authenticate method. The client library will then try to authenticate the user in different ways depending on the runtime context.
If your game is published on a Canvas page, the client library will automatically grab the UserToken and pass it in.
If you are developing a game in the Unity3D editor, you need to create a textfile called 'usertoken.txt' containing a UserToken, and that will be used for authentication.
Here is an example of authenticating automatically with the .NET client: