Files
dancefinder-app/middleware/auth.js
T
2020-04-06 10:52:55 +02:00

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)
}