import { useAuth } from '~/plugins/auth' export default ({ app: { router } }) => { const onRedirectCallback = (appState) => { router.push( appState && appState.targetUrl ? appState.targetUrl : window.location.pathname ) } useAuth(onRedirectCallback) }