Beispiel #1
0
 public IObservable <ITogglDataSource> LoginWithGoogle()
 => database
 .Clear()
 .SelectMany(_ => googleService.GetAuthToken())
 .Select(Credentials.WithGoogleToken)
 .Select(apiFactory.CreateApiWith)
 .SelectMany(api => api.User.GetWithGoogle())
 .Select(User.Clean)
 .SelectMany(database.User.Create)
 .Select(dataSourceFromUser)
 .Do(shortcutCreator.OnLogin);
Beispiel #2
0
 public IObservable <ITogglDataSource> LoginWithGoogle()
 => database
 .Clear()
 .SelectMany(_ => googleService.LogOutIfNeeded())
 .SelectMany(_ => googleService.GetAuthToken())
 .SelectMany(loginWithGoogle);