|
@@ -43,8 +43,16 @@ public class SignInWithAppleTest_Callbacks : MonoBehaviour
|
|
|
var allName = userInfo.displayName.Split(' ');
|
|
|
var _name = allName[0];
|
|
|
var _surname = allName[1];
|
|
|
-
|
|
|
+
|
|
|
// Print out information about the user who logged in.
|
|
|
+ SocialManager.Instance.userID = userInfo.userId;
|
|
|
+ SocialManager.Instance._name = _name;
|
|
|
+ SocialManager.Instance._surname = _surname;
|
|
|
+ SocialManager.Instance._usermail= userInfo.email;
|
|
|
+ SocialManager.Instance._username = userInfo.userId;
|
|
|
+ PlayerPrefs.SetString("UserID", userInfo.userId);
|
|
|
+ PlayerPrefs.SetInt("Login", 1);
|
|
|
+ PlayerPrefs.Save();
|
|
|
GameDatabaseManager.Instance.RegisterUser(userInfo.userId, _name, _surname, userInfo.displayName, userInfo.email, OnLoginCompleted);
|
|
|
Debug.Log(
|
|
|
string.Format("Display Name: {0}\nEmail: {1}\nUser ID: {2}\nID Token: {3}", userInfo.displayName ?? "",
|