mirror of
https://github.com/Bubka/2FAuth.git
synced 2025-06-08 22:16:53 +02:00
11 lines
357 B
JavaScript
Vendored
11 lines
357 B
JavaScript
Vendored
/**
|
|
* Allows an authenticated user to access the main view only if he owns at least one twofaccount.
|
|
* Push to the starter view otherwise.
|
|
*/
|
|
export default function starter({ to, next, stores }) {
|
|
const { user } = stores
|
|
const startPoint = useStorage(user.$2fauth.prefix + 'returnTo', 'accounts')
|
|
startPoint.value = to.name
|
|
|
|
next()
|
|
} |