fix(striker-ui): correct /login to post with-credentials enabled

main
Tsu-ba-me 2 years ago
parent 4bbdcc1687
commit 0f223950e4
  1. 7
      striker-ui/components/GatePanel.tsx

@ -26,7 +26,11 @@ const GatePanel: FC = () => {
setIsSubmitting(true); setIsSubmitting(true);
api api
.post('/auth/login', { username, password }) .post(
'/auth/login',
{ username, password },
{ withCredentials: true },
)
.then(() => { .then(() => {
router.push('/'); router.push('/');
}) })
@ -34,6 +38,7 @@ const GatePanel: FC = () => {
const emsg = handleAPIError(error, { const emsg = handleAPIError(error, {
onResponseErrorAppend: () => ({ onResponseErrorAppend: () => ({
children: `Credentials mismatched.`, children: `Credentials mismatched.`,
type: 'warning',
}), }),
}); });

Loading…
Cancel
Save