Example #1
0
export function* handleAuth() {
  const spinnerName = 'Loading google auth';

  yield call(siteGlobalLoadingBar.show, spinnerName);
  yield gapiAuthorize();
  yield call(siteGlobalLoadingBar.hide, spinnerName);
  yield call(googleDriveApi.loadDriveApi);
  yield call(thoughtStorage.scanDrive);
  yield setPageAction(PAGES_ENUM.NOTES);
}
Example #2
0
export function* loginInit() {
  yield googleApiLoader.load();
  yield put(googleApiInitializedAction());
  yield takeEvery(REQUEST_AUTHORIZATION, handleAuth);
}