@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
- if (isExternalUrl(returnTo.value)) {
127
- window.location.href = returnTo.value;
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(returnTo.value);
130
- if (routeExists.matched.length != 0) router.push(returnTo.value);
131
- else window.location.href = returnTo.value;
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
  );
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fy-/fws-vue",
3
- "version": "0.0.935",
3
+ "version": "0.0.936",
4
4
  "author": "Florian 'Fy' Gasquez <m@fy.to>",
5
5
  "license": "MIT",
6
6
  "repository": {