1
0
Fork 0
mirror of https://gitlab.com/bramw/baserow.git synced 2025-04-23 04:40:15 +00:00
bramw_baserow/web-frontend/plugins/auth.js
2019-08-26 19:41:00 +02:00

12 lines
403 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'] &&
process.browser
) {
store.dispatch('auth/startRefreshTimeout')
}
}