public AccountViewModel(IFirebaseAuth firebaseAuth, IFirebaseNotificationsService firebaseNotifications, IAccountService accountService) { _firebaseAuth = firebaseAuth; _firebaseNotifications = firebaseNotifications; _accountService = accountService; Instances = new MvxObservableCollection <OctoprintInstanceViewModel>(); ConnectEnabled = true; SubscribeEnabled = true; DisconnectEnabled = true; }
public AuthService( IFirebaseAuth firebaseAuth, IPreferencesService preferencesService) { _firebaseAuth = firebaseAuth; _preferencesService = preferencesService; _currentUserSubject = new BehaviorSubject <IFirebaseUser>(null); _isSignInRunningSubject = new BehaviorSubject <bool>(false); _currentUserSubject.OnNext(_firebaseAuth.CurrentUser); }
public ChatVM(IChatService chatService) { _chatService = chatService; _firebaseAuth = DependencyService.Get <IFirebaseAuth>(); _firebaseStorage = DependencyService.Get <IFirebaseStorage>(); _firebaseDatabase = DependencyService.Get <IFirebaseDatabase>(); //FakeData(); _chatService.NewMessageReceived += ChatVM_NewMessageReceived; GetUser().ContinueWith(x => GetDataFromFirebase()); }
async void ClickMe(System.Object sender, System.EventArgs e) { try { _fireAuth = _firebaseAuth.Value; await _fireAuth.VerifyPhoneNumberAsync(phoneEntry.Text); await Navigation.PushAsync(new OTPVerifyPage(_fireAuth)); } catch (FirebaseException ex) { await DisplayAlert("Error", ex.Message, "Okay"); } catch (Exception ex) { await DisplayAlert("Error", ex.Message, "Okay"); } }
public OTPVerifyPage(IFirebaseAuth _fireAuth) { InitializeComponent(); this._firebaseAuth = _fireAuth; }