Add password input

This commit is contained in:
2026-03-20 22:12:59 -04:00
parent 53ccfe1d4f
commit 7265eaad18
6 changed files with 74 additions and 5 deletions

View File

@@ -28,13 +28,15 @@ export default function AxiosProvider({
const publicApi = useMemo(() => {
const api = axios.create({
baseURL: apiUrl
baseURL: apiUrl,
withCredentials: true
});
return api;
}, [apiUrl]);
const authorizedApi = useMemo(() => {
const api = axios.create({
baseURL: apiUrl
baseURL: apiUrl,
withCredentials: true
});
api.interceptors.request.use(async (config) => {
try{

View File

@@ -26,7 +26,7 @@ export const defaultTokenData: TokenData = {
}
export async function fetchToken(apiUrl: string){
const res = await fetch(`${apiUrl}/refresh`);
const res = await fetch(`${apiUrl}/auth/refresh`, { method: "POST", credentials: "include" });
return await res.json() as TokenResponse;
}