@fy-/fws-vue 0.0.935 → 0.0.936
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -123,12 +123,15 @@ const userFlow = async (params: paramsType = { initial: false }) => {
|
|
|
123
123
|
}
|
|
124
124
|
if (response.value.data.complete == true && response.value.data.user) {
|
|
125
125
|
store.setUser(response.value.data.user);
|
|
126
|
-
|
|
127
|
-
|
|
126
|
+
const actualReturnTo = response.value.data.redirect
|
|
127
|
+
? response.value.data.redirect
|
|
128
|
+
: returnTo.value;
|
|
129
|
+
if (isExternalUrl(actualReturnTo)) {
|
|
130
|
+
window.location.href = actualReturnTo;
|
|
128
131
|
} else {
|
|
129
|
-
const routeExists = router.resolve(
|
|
130
|
-
if (routeExists.matched.length != 0) router.push(
|
|
131
|
-
else window.location.href =
|
|
132
|
+
const routeExists = router.resolve(actualReturnTo);
|
|
133
|
+
if (routeExists.matched.length != 0) router.push(actualReturnTo);
|
|
134
|
+
else window.location.href = actualReturnTo;
|
|
132
135
|
}
|
|
133
136
|
return;
|
|
134
137
|
}
|
|
@@ -137,6 +140,7 @@ const userFlow = async (params: paramsType = { initial: false }) => {
|
|
|
137
140
|
return;
|
|
138
141
|
}
|
|
139
142
|
if (response.value.data.redirect && response.value.data.complete) {
|
|
143
|
+
session.value = null;
|
|
140
144
|
router.push(
|
|
141
145
|
response.value.data.redirect ? response.value.data.redirect : "/",
|
|
142
146
|
);
|