Skip to content

Commit ecfdf4c

Browse files
authored
docs(auth): rename redirectTo to redirect (#1305)
1 parent caed2f0 commit ecfdf4c

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

docs/guide/auth.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -61,8 +61,8 @@ router.beforeEach(async (to) => {
6161
path: '/login',
6262
query: {
6363
// we keep the current path in the query so we can redirect to it after login
64-
// with `router.push(route.query.redirectTo || '/')`
65-
redirectTo: to.fullPath,
64+
// with `router.push(route.query.redirect || '/')`
65+
redirect: to.fullPath,
6666
},
6767
}
6868
}
@@ -84,8 +84,8 @@ onMounted(async () => {
8484
const currentUser = await getCurrentUser()
8585
if (currentUser) {
8686
const to =
87-
route.query.redirectTo && typeof route.query.redirectTo === 'string'
88-
? route.query.redirectTo
87+
route.query.redirect && typeof route.query.redirect === 'string'
88+
? route.query.redirect
8989
: '/'
9090

9191
router.push(to)

0 commit comments

Comments
 (0)