I have set up the connection with "Authentication: Basic" and I have checked the box that says "Require Authentication" and provided a secret key. On my server I have some code that generates the auth hash and passes it into my flash movie.
I use the following code in Flash to call the authenticate method:
- Code: Select all
PlayerIO.authenticate(
timeline.stage,
MY_GAME_ID,
"myconnectionname",
{ userId: MY_USER_ID, auth: MY_AUTH},
null,
handleConnect,
handleLoginError);
(The MY_AUTH variable above contains the auth hash passed from my server).
Whenever I try to connect using this method I get the following error:
Error: An unexpected error occurred inside the Player.IO webservice. Please try again. - Reference code: 21ff3dcb
The Reference code that is generated is usually different each time the error occurs.
I assume that my auth hash is being generated correctly on my server because if I send an incorrect value (such as "xxxx") I get the following error instead:
Error: Basic Authentication: The given 'auth' string was invalid
Can anybody point out what I might be doing wrong here?