Merge pull request #3231 from rommapp/copilot/fix-registration-link-redirects

fix: registration links redirect to login for unauthenticated users
This commit is contained in:
Georges-Antoine Assi
2026-04-07 22:18:20 -04:00
committed by GitHub
2 changed files with 14 additions and 0 deletions

View File

@@ -74,6 +74,17 @@ api.interceptors.response.use(
const params = new URLSearchParams(search);
const fullPath = pathname + search;
// Don't redirect to login if already on an auth-exempt route
const authExemptRoutes = [
ROUTES.REGISTER,
ROUTES.RESET_PASSWORD,
ROUTES.PAIR,
ROUTES.SETUP,
];
if (authExemptRoutes.some((route) => pathname.startsWith(`/${route}`))) {
return Promise.reject(error);
}
router.push({
name: ROUTES.LOGIN,
query: {

View File

@@ -72,6 +72,9 @@ export default defineConfig(({ mode }) => {
return {
optimizeDeps: {
include: VUETIFY_COMPONENTS,
esbuildOptions: {
target: "esnext",
},
},
build: {
target: "esnext",