fix(auth): Fix auth flow for the client app

This commit is contained in:
Bouncey
2018-10-24 00:24:48 +01:00
committed by mrugesh mohapatra
parent a656cbf98a
commit c08bb95ea8
19 changed files with 348 additions and 212 deletions

View File

@@ -11,7 +11,12 @@ import { ofType } from 'redux-observable';
import store from 'store';
import uuid from 'uuid/v4';
import { types, onlineStatusChange, isOnlineSelector } from './';
import {
types,
onlineStatusChange,
isOnlineSelector,
isSignedInSelector
} from './';
import postUpdate$ from '../templates/Challenges/utils/postUpdate$';
import { isGoodXHRStatus } from '../templates/Challenges/utils';
@@ -36,6 +41,7 @@ function failedUpdateEpic(action$, state$) {
const flushUpdates = action$.pipe(
ofType(types.fetchUserComplete, types.updateComplete),
filter(() => isSignedInSelector(state$.value)),
filter(() => store.get(key)),
filter(() => isOnlineSelector(state$.value)),
tap(() => {