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