mirror of
https://github.com/Bubka/2FAuth.git
synced 2025-08-18 09:29:46 +02:00
Rename startingPoint middleware to setReturnTo
This commit is contained in:
@@ -2,10 +2,10 @@
|
||||
* 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 }) {
|
||||
export default function setReturnTo({ to, next, stores }) {
|
||||
const { user } = stores
|
||||
const startPoint = useStorage(user.$2fauth.prefix + 'returnTo', 'accounts')
|
||||
startPoint.value = to.name
|
||||
const returnTo = useStorage(user.$2fauth.prefix + 'returnTo', 'accounts')
|
||||
returnTo.value = to.name
|
||||
|
||||
next()
|
||||
}
|
Reference in New Issue
Block a user