Exemplo n.º 1
0
        private async static Task saveAccountToDevice(Account i_Account)
        {
            if (s_AuthType == MobileServiceAuthenticationProvider.Facebook)
            {
                await SecureStorageAccountStore.SaveAccountAsync(i_Account, "Facebook");
            }

            else if (s_AuthType == MobileServiceAuthenticationProvider.Google)
            {
                await SecureStorageAccountStore.SaveAccountAsync(i_Account, "Google");
            }
        }
Exemplo n.º 2
0
        public static async Task AutoConnect()
        {
            s_Account = await SecureStorageAccountStore.GetAccountAsync("Facebook");

            s_AuthType = MobileServiceAuthenticationProvider.Facebook;
            if (s_Account == null)
            {
                s_Account = await SecureStorageAccountStore.GetAccountAsync("Google");

                s_AuthType = MobileServiceAuthenticationProvider.Google;
            }

            if (s_Account != null)
            {
                await loginToBackend();

                LoggedIn?.Invoke();
            }
        }