// Defer the configuration creation until Awake so the web Client ID
 // Can be set via the property inspector in the Editor.
 void Awake()
 {
     configuration = new GoogleSignInConfiguration {
         WebClientId    = webClientId,
         RequestIdToken = true
     };
 }
示例#2
0
    /*
     * To Make sure AuthController is a single instance
     * To Make sure WebCLientID for Google was provided
     * To Initiate Facebook
     */

    // Defer the configuration creation until Awake so the web Client ID
    // Can be set via the property inspector in the Editor.

    void Awake()
    {
        if (AuthController.authController == null)
        {
            AuthController.authController = this;
        }
        else
        {
            if (AuthController.authController != this)
            {
                Destroy(gameObject);
            }
            DontDestroyOnLoad(gameObject);
        }

        if (webClientId != string.Empty)
        {
            m_configuration = new GoogleSignInConfiguration
            {
                WebClientId    = webClientId,
                RequestIdToken = true
            };
        }
        else
        {
            Debug.Log("webClientId not provided");
        }

        FB.Init(InitCallBack, OnHideUnity);
    }
示例#3
0
 private void Awake()
 {
     configuration = new GoogleSignInConfiguration {
         WebClientId = webClientId, RequestEmail = true, RequestIdToken = true
     };
     CheckFirebaseDependencies();
 }
//called before the start
    void Awake()
    {
        Debug.Log("Awake");
        configuration = new GoogleSignInConfiguration {
            WebClientId = webClientId, RequestEmail = true, RequestIdToken = true
        };
    }
示例#5
0
 private void Awake()
 {
     //RequestEmail is true if you want to get the email adress, else false.
     configuration = new GoogleSignInConfiguration {
         WebClientId = webClientId, RequestEmail = true, RequestIdToken = true
     };
     CheckFirebaseDependencies();
 }
 // Defer the configuration creation until Awake so the web Client ID
 // Can be set via the property inspector in the Editor.
 private void Awake()
 {
     configuration = new GoogleSignInConfiguration
     {
         WebClientId    = Constants.WEB_CLIENT_ID,
         RequestIdToken = true
     };
 }
 public void Init()
 {
     //Setup for Google Sign In
     configuration = new GoogleSignInConfiguration
     {
         WebClientId    = webClientId,
         RequestIdToken = true
     };
 }
 public GoogleAuthorization(string webClientId)
 {
     _configuration = new GoogleSignInConfiguration
     {
         WebClientId    = webClientId,
         RequestIdToken = true,
         RequestEmail   = true,
         UseGameSignIn  = false
     };
 }
示例#9
0
 private void Awake()
 {
     auth          = FirebaseAuth.DefaultInstance;
     configuration = new GoogleSignInConfiguration
     {
         WebClientId    = webClientId,
         RequestEmail   = true,
         RequestIdToken = true
     };
 }
    void Awake()
    {
        configuration = new GoogleSignInConfiguration
        {
            WebClientId    = WebClientId,
            RequestIdToken = true
        };

        auth = Firebase.Auth.FirebaseAuth.DefaultInstance;
    }
示例#11
0
 // Defer the configuration creation until Awake so the web Client ID
 // Can be set via the property inspector in the Editor.
 void Awake()
 {
     configuration = new GoogleSignInConfiguration
     {
         RequestIdToken = true,
         // Copy this value from the google-service.json file.
         // oauth_client with type == 3
         WebClientId = "332220285053-ie7cb8m82ngokg09jar5fc722cq696lu.apps.googleusercontent.com"
     };
 }
示例#12
0
	void Awake()
	{
		configuration = new GoogleSignInConfiguration
		{
			WebClientId = WebID,
			RequestEmail = true,
			RequestIdToken = true
		};

	}
    private void Awake()
    {
#if UNITY_ANDROID && !UNITY_EDITOR
        configuration = new GoogleSignInConfiguration
        {
            WebClientId    = webClientId,
            RequestIdToken = true
        };
#endif
    }
示例#14
0
    // Start is called before the first frame update

    private void Awake()
    {
        webClientId   = Setting.GetGoogleToken();
        configuration = new GoogleSignInConfiguration
        {
            WebClientId    = webClientId,
            RequestIdToken = true
        };
        canvas = GameObject.Find("Canvas").GetComponent <Canvas>();
        signin.onClick.AddListener(OnSignIn);
    }
示例#15
0
 // Defer the configuration creation until Awake so the web Client ID
 // Can be set via the property inspector in the Editor.
 void Awake()
 {
     configuration = new GoogleSignInConfiguration
     {
         WebClientId     = webClientId,
         RequestIdToken  = true,
         UseGameSignIn   = false,
         RequestAuthCode = false,
         RequestEmail    = true
     };
 }
 // Initialize Google Sign In SDK
 private void InitializeGoogleSignIn()
 {
     // Create configuration for Google Sign In SDK
     googleConfiguration = new GoogleSignInConfiguration
     {
         WebClientId    = webClientId,
         RequestEmail   = true,
         RequestIdToken = true
     };
     Debug.Log("Google SDK Initialized");
 }
示例#17
0
 // Can be set via the property inspector in the Editor.
 void Awake()
 {
     configuration = new GoogleSignInConfiguration
     {
         WebClientId       = webClientId,
         RequestIdToken    = true,
         UseGameSignIn     = false,
         RequestEmail      = true,
         RequestProfile    = true,
         ForceTokenRefresh = true,
     };
 }
示例#18
0
    // Defer the configuration creation until Awake so the web Client ID
    // Can be set via the property inspector in the Editor.
    protected void Awake()
    {
        // 페이스북 초기화
        FB.Init();

        // 구글 초기화
        configuration = new GoogleSignInConfiguration
        {
            WebClientId    = webClientId,
            RequestIdToken = true
        };
    }
示例#19
0
    //1015055125254-51e7vqcpp0j3r29l6dnbpngmrvb9ruc9.apps.googleusercontent.com
    //com.googleusercontent.apps.1015055125254-51e7vqcpp0j3r29l6dnbpngmrvb9ruc9

    // Start is called before the first frame update
    void Start()
    {
        BCConfig._bc.SetAlwaysAllowProfileSwitch(true);
        BCConfig._bc.Client.EnableLogging(true);

        status = GameObject.Find("Status").GetComponent <Text>();

        configuration = new GoogleSignInConfiguration
        {
            WebClientId    = webClientId,
            RequestEmail   = true,
            RequestIdToken = true
        };
        statusText = "Setup!\n" + webClientId;
    }
示例#20
0
    // Start is called before the first frame update
    void Start()
    {
        //allow the people who sign in to change profiles.
        BCConfig._bc.SetAlwaysAllowProfileSwitch(true);
        BCConfig._bc.Client.EnableLogging(true);

        status = GameObject.Find("Status").GetComponent <Text>();

        configuration = configuration = new GoogleSignInConfiguration
        {
            WebClientId     = webClientId,
            RequestEmail    = true,
            RequestIdToken  = true,
            RequestAuthCode = true
        };
    }
示例#21
0
 void Awake()
 {
     GoogleSignManager.Instance = this;
     configuration = new GoogleSignInConfiguration
     {
         WebClientId    = webClientId,
         RequestEmail   = true,
         RequestIdToken = true
     };
     if (ProgressCircle == null && ProgressCirclePrefab != null)
     {
         ProgressCircle = Instantiate(ProgressCirclePrefab, this.transform);
         ProgressCircle.transform.localPosition = Vector3.zero;
         ProgressCircle.gameObject.SetActive(false);
     }
     CheckFirebaseDependencies();
 }
示例#22
0
    // Use this for initialization
    void Start()
    {
        //allow the people who sign in to change profiles.
        BCConfig._bc.SetAlwaysAllowProfileSwitch(true);
        BCConfig._bc.Client.EnableLogging(true);

        //unity's ugly way to look for gameobjects
        status = GameObject.Find("Status").GetComponent <Text>();

        configuration = new GoogleSignInConfiguration
        {
            WebClientId    = webClientId,
            RequestEmail   = true,
            RequestIdToken = true,
            //auth code is not needed for OpenId authentication
            RequestAuthCode = true
        };
    }
示例#23
0
        // Defer the configuration creation until Awake so the web Client ID
        // Can be set via the property inspector in the Editor.
        void Awake()
        {
            auth = Firebase.Auth.FirebaseAuth.DefaultInstance;

#if UNITY_ANDROID
            if (GoogleSignIn.Configuration == null)
            {
                configuration = new GoogleSignInConfiguration
                {
                    WebClientId    = webClientId,
                    RequestIdToken = true
                };
            }
#endif


            //auth.StateChanged += AuthStateChanged;
            //AuthStateChanged(this, null);
        }
示例#24
0
    private void Awake()
    {
        /* Google Initializations */
        configuration = new GoogleSignInConfiguration {
            WebClientId = webClientId, RequestEmail = true, RequestIdToken = true
        };
        CheckFirebaseDependencies();        // Don't add this when you are running the game in the editor
        /* Facebook Initializations */
        if (!(FB.IsInitialized))
        {
            // Initiliaze the facebook sdk
            FB.Init(InitCallback, OnHideUnity);
        }
        else
        {
            // Already initialized, signal an app activation event
            FB.ActivateApp();
        }

        Debug.Log(FB.Android.KeyHash);
    }
 public void Configure(GoogleSignInConfiguration configuration)
 {
     if (configuration != null)
     {
         List <string> scopes = new List <string>();
         if (configuration.AdditionalScopes != null)
         {
             scopes.AddRange(configuration.AdditionalScopes);
         }
         GoogleSignIn_Configure(SelfPtr(), configuration.UseGameSignIn,
                                configuration.WebClientId,
                                configuration.RequestAuthCode,
                                configuration.ForceTokenRefresh,
                                configuration.RequestEmail,
                                configuration.RequestIdToken,
                                configuration.HidePopups,
                                scopes.ToArray(),
                                scopes.Count,
                                configuration.AccountName);
     }
 }
    void Start()
    {
        auth          = Firebase.Auth.FirebaseAuth.DefaultInstance;
        configuration = new GoogleSignInConfiguration()
        {
            WebClientId    = clientID,
            RequestIdToken = true
        };

        // dataManager = FindObjectOfType<UserDataManager>();

        //check for data
        Debug.Log(Application.persistentDataPath);
        if (File.Exists(Application.persistentDataPath + "/userdata.data"))
        {
            googlesignin();
            //alreadySignedIn = true;
            //LoadUserData();
            Debug.Log("Pre existing user..");
        }

        DontDestroyOnLoad(gameObject);
    }
 internal GoogleSignInImpl(GoogleSignInConfiguration configuration)
     : base(GoogleSignIn_Create(GetPlayerActivity()))
 {
     Configure(configuration);
 }