Skip to content

Open-source event management and ticket selling platform — perfect for concerts, conferences, and everything in between 🎟️ If you find this project helpful, please consider giving us a star ⭐️

Fix checkout redirect to login

Dave Earleydefd06de4b98
diff --git a/frontend/src/api/client.ts b/frontend/src/api/client.ts
index d43966403..a6a52febb 100644
--- a/frontend/src/api/client.ts
+++ b/frontend/src/api/client.ts
@@ -16,6 +16,7 @@ const ALLOWED_UNAUTHENTICATED_PATHS = [
'forgot-password',
'auth',
'account/payment',
+ 'checkout',
'/event/'
];
@@ -27,6 +28,7 @@ export const api = axios.create({
withCredentials: true,
});
+
const existingToken = typeof window !== "undefined" ? window.localStorage.getItem('token') : undefined;
if (existingToken) {
setAuthToken(existingToken);