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