Skip to content

Commit

Permalink
fix(frontend): update token refresh calls to match updates in PR #1948
Browse files Browse the repository at this point in the history
  • Loading branch information
spwoodcock committed Dec 9, 2024
1 parent 3205906 commit 48a9a69
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/frontend/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ const CheckLoginState = () => {
const authDetails = CoreModules.useAppSelector((state) => state.login.authDetails);

const checkIfUserLoginValid = () => {
fetch(`${import.meta.env.VITE_API_URL}/auth/refresh`, { credentials: 'include' })
fetch(`${import.meta.env.VITE_API_URL}/auth/refresh/management`, { credentials: 'include' })
.then((resp) => {
if (resp.status !== 200) {
dispatch(LoginActions.signOut());
Expand Down
2 changes: 1 addition & 1 deletion src/mapper/src/routes/[projectId]/+page.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ export const load: PageLoad = async ({ parent, params, fetch }) => {
/*
Login + user details
*/
const userResponse = await fetch(`${API_URL}/auth/refresh`, { credentials: 'include' });
const userResponse = await fetch(`${API_URL}/auth/refresh/mapper`, { credentials: 'include' });
if (userResponse.status === 401) {
// TODO redirect to different error page to handle login
loginStore.signOut();
Expand Down

0 comments on commit 48a9a69

Please sign in to comment.