chore: make auth and apollo a bit more reactive
This commit is contained in:
@@ -0,0 +1,12 @@
|
||||
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)
|
||||
}
|
||||
Reference in New Issue
Block a user