//Most of this could be shared public void HandleLoginResult(System.Threading.Tasks.Task <Microsoft.WindowsAzure.MobileServices.MobileServiceUser> t, LoginPlatform platform) { if (t.Status == TaskStatus.RanToCompletion && t.Result != null && !string.IsNullOrEmpty(t.Result.UserId)) { //Save our app settings for next launch var settings = SettingsPresenter.Current; settings.UserId = t.Result.UserId; if (platform != null) { settings.AuthenticationProvider = (int)platform.Provider; } settings.Save(); //Navigate to the Lists view //RequestNavigate<WishListsViewModel>(); var homecontroller = new HomeViewController(); this.NavigationController.PushViewController(homecontroller, true); } else { //Show Error //ReportError("Login Failed!"); } }
//Most of this could be shared public void HandleLoginResult(System.Threading.Tasks.Task<Microsoft.WindowsAzure.MobileServices.MobileServiceUser> t, LoginPlatform platform) { if (t.Status == TaskStatus.RanToCompletion && t.Result != null && !string.IsNullOrEmpty(t.Result.UserId)) { //Save our app settings for next launch var settings = SettingsPresenter.Current; settings.UserId = t.Result.UserId; if (platform != null) settings.AuthenticationProvider = (int)platform.Provider; settings.Save(); //Navigate to the Lists view //RequestNavigate<WishListsViewModel>(); var homecontroller = new HomeViewController(); this.NavigationController.PushViewController(homecontroller, true); } else { //Show Error //ReportError("Login Failed!"); } }