chore: make auth and apollo a bit more reactive

This commit is contained in:
2020-04-06 10:19:18 +02:00
parent aa557faf22
commit cc9968bd06
14 changed files with 1327 additions and 360 deletions
+12
View File
@@ -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)
}