Files
dancefinder-app/middleware/auth.js
T

13 lines
296 B
JavaScript
Raw Normal View History

2020-06-21 17:59:14 +02:00
import { useAuth } from '../plugins/auth'
2020-04-06 10:52:55 +02:00
export default async ({ app: { router } }) => {
const onRedirectCallback = (appState) => {
router.push(
appState && appState.targetUrl
? appState.targetUrl
: window.location.pathname
)
}
useAuth(onRedirectCallback)
}