try to fix rediirect issues

This commit is contained in:
Dobromir Popov
2024-05-08 16:29:49 +03:00
parent 4021279fb8
commit 5816838bbe
2 changed files with 2 additions and 2 deletions

View File

@ -24,7 +24,6 @@ applyAuthTokenInterceptor(axiosInstance, { requestRefresh }); // Notice that th
// 4. Logging in
const login = async (params) => {
const response = await axiosInstance.post('/api/auth/signin', params)
// save tokens to storage
setAuthTokens({
accessToken: response.data.access_token,

View File

@ -31,7 +31,8 @@ const axiosServer = async (context) => {
}
else {
//redirect to next-auth login page
context.res.writeHead(302, { Location: encodeURIComponent('/api/auth/signin') });
//context.res.writeHead(302, { Location: encodeURIComponent('/api/auth/signin') });
context.res.end();
return { props: {} };
}