Skip to content

Commit e745797

Browse files
authored
Merge pull request #40 from HiEventsDev/develop
Fix email confirmation page not passing token
2 parents ba077c1 + 4d21402 commit e745797

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

frontend/src/api/client.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,11 @@ export const api = axios.create({
2626
withCredentials: true,
2727
});
2828

29+
const existingToken = typeof window !== "undefined" ? window.localStorage.getItem('token') : undefined;
30+
if (existingToken) {
31+
setAuthToken(existingToken);
32+
}
33+
2934
api.interceptors.response.use(
3035
(response) => {
3136
// Securely update the token on each response

0 commit comments

Comments
 (0)