Sign In Register

How can we help you today?

Start a new topic
Answered

Game Center / GS authentication

What is the recommend way to log in with Game Center?


My Game Center authentication is successful as the "welcome back" screen is showing.

Social.localUser.Authenticate(MyCallback)

But my call to GS is failing

	new GameCenterConnectRequest().Send((response) => {
		if (response.HasErrors){
			Debug.Log ("IOS login unsucessful");
		} else {
			Debug.Log ("IOS login sucessful");
			
			//things to do
			
		}
		
		Debug.Log("request done");
	});

 

The error message seem to mean that the display name and the externalPlayerId are required despite what the doc says.

I would gladly send forward those info, but I can't seem to get from where they could be retrieved.








Best Answer
A fix for this has been created and is available as an add-on package (due to possible problems with GameKit not being enabled during compile).

We will update the docs with this fix, but if it is not yet available you can request the unity-package by raising a ticket.

Thanks,
Sean

 


Hi, All


My simple variant of Unity native plugin for iOS, which call generateIdentityVerification method. Maybe help someone.


https://github.com/alexbivz/unity3d-gamekit-identity-plugin

Hi Helana Santos, this is still working for me I just had something wrong setup when I mentioned it was not working anymore, forgot to mention it here. I still believe GameSparks guys should provide a built-in method for this.

Hi,


Just wanted to share a potential solution for this completely ignoring the GameCenterConnectRequest as it doesn't seem to be supported anymore. 


The logic would be something like:

If player is connected to Game Center or Google Play then call AuthenticationRequest using their username as the player's social ID.

If player is new the Authentication will fail. So call RegistrationRequest and then AuthenticationRequest again.

If player isn't connected to a social service then just use Device Authentication.


Hope it helps.

Hjupter. This one error {"signature":"NOTAUTHENTICATED"}. Always. with 4 different plugins.

{"signature":"NOTAUTHENTICATED"} this one. Always.

What error are you getting? Maybe I need to update it.

Hjupter. I have tried this plugin already :-) and still have same error even from test scene :-)

Alexey you can try this package here: https://www.dropbox.com/s/j5hgk6hd1lawntv/GameSparksGameKit.unitypackage?dl=0


I still think GameSpark guys should fix on their SDK.

Hi. I tried used several unity plugins to get all information for GameCenterConnectRequest(salt, signature, etc) but always I got {"signature":"NOTAUTHENTICATED"} error. 



 [MonoPInvokeCallback(typeof(GameCenterSignature.OnSucceeded))]

 static void OnFinishGenerateSignatures(string PublicKeyUrl,

          ulong timestamp,

          string signature,

          string salt,

          string playerID,

          string bundleID)

    {

        new GameCenterConnectRequest()

            .SetSyncDisplayName(true)

           .SetExternalPlayerId(playerID)

           .SetSalt(salt)

           .SetTimestamp(Convert.ToInt64(timestamp))

           .SetPublicKeyUrl(PublicKeyUrl)

           .SetSignature(signature)

           .SetSwitchIfPossible(true)

           .SetDisplayName(GameCenter.GetUserDisplayName())

           .Send(respose =>

           {

             

           });

    }

Unity 5.6.0. GameSparks SDK 5.5.4.48

What I do wrong ??


iOS 10.3 is out and apparently this doesnt work anymore are you guys from GameSparks going to update the SDK for this?

This package works fine and has been tested on an Iphone 6s plus with iOS 10.1.1:

https://www.dropbox.com/s/j5hgk6hd1lawntv/GameSparksGameKit.unitypackage?dl=0


Feel free to contact me if you find any problem or have a question.

I managed to get this working in IOS 10 with latest GameSparks SDK I'm going to post a unityPackage here soon.

Hi. I have the same question. Do we need an add-on?

Hi I see last post is 5 months ago, do we still need an add-on to get GameCenter login working?


2 people like this

Hi Andrey,


This has been forwarded onto you. If anyone else needs this please raise a ticket to request it.


Thanks,

Liam

Login to post a comment