Files
planka/client/src/sagas/login/index.js

17 lines
515 B
JavaScript
Raw Normal View History

import { all, call, cancel, fork, take } from 'redux-saga/effects';
2019-08-31 04:07:25 +05:00
import watchers from './watchers';
2022-08-04 13:31:14 +02:00
import services from './services';
2019-08-31 04:07:25 +05:00
import ActionTypes from '../../constants/ActionTypes';
export default function* loginSaga() {
2020-03-25 00:15:47 +05:00
const watcherTasks = yield all(watchers.map((watcher) => fork(watcher)));
2019-08-31 04:07:25 +05:00
2023-10-17 19:18:19 +02:00
yield fork(services.initializeLogin);
2023-10-19 16:05:34 +02:00
yield take([ActionTypes.AUTHENTICATE__SUCCESS, ActionTypes.USING_OIDC_AUTHENTICATE__SUCCESS]);
2019-08-31 04:07:25 +05:00
yield cancel(watcherTasks);
2022-08-04 13:31:14 +02:00
yield call(services.goToRoot);
2019-08-31 04:07:25 +05:00
}