diff --git a/striker-ui/components/GatePanel.tsx b/striker-ui/components/GatePanel.tsx index e40b3444..66d757f2 100644 --- a/striker-ui/components/GatePanel.tsx +++ b/striker-ui/components/GatePanel.tsx @@ -28,11 +28,7 @@ const GatePanel: FC = () => { setIsSubmitting(true); api - .post( - '/auth/login', - { username, password }, - { withCredentials: true }, - ) + .post('/auth/login', { username, password }) .then(() => { const url = returnTo ? String(returnTo) : '/'; diff --git a/striker-ui/lib/api.ts b/striker-ui/lib/api.ts index 2a3db27b..3c9a4f83 100644 --- a/striker-ui/lib/api.ts +++ b/striker-ui/lib/api.ts @@ -7,6 +7,7 @@ const api = new Axios({ transformRequest: axios.defaults.transformRequest, transformResponse: axios.defaults.transformResponse, validateStatus: (status) => status < 400, + withCredentials: true, }); export default api;