1
0
Fork 0
mirror of https://gitlab.com/bramw/baserow.git synced 2025-05-20 15:39:35 +00:00
bramw_baserow/web-frontend/modules/core/plugins/auth.js
2020-03-31 14:15:27 +00:00

13 lines
471 B
JavaScript

export default function ({ store }) {
// If the user is authenticated, but is not refreshing in the browser means
// that the refresh was done on the server side, so we need to manually start
// the refreshing timeout here.
if (
store.getters['auth/isAuthenticated'] &&
!store.getters['auth/isRefreshing'] &&
// @TODO Maybe replace this in the config with mode: 'client'.
process.browser
) {
store.dispatch('auth/startRefreshTimeout')
}
}