Skip to content
Snippets Groups Projects

Working email validation and hiding controller logic to InputField

Merged Defendi Alberto requested to merge api-login into dev
4 files
+ 8
6
Compare changes
  • Side-by-side
  • Inline
Files
4
@@ -7,10 +7,11 @@ export const AuthUser: FC = () => {
useEffect(() => {
axios
.get('api/web/csrf')
.then((response) =>
sessionStorage.setItem('CSRF_TOKEN', response.data.token),
)
.catch((error) => console.log(error));
.then((response) => {
// Check this https://stackoverflow.com/questions/39254562/csrf-with-django-reactredux-using-axios
axios.defaults.headers.common['X-CSRFTOKEN'] = response.data.token;
})
.catch((error) => error);
}, []);
return (
<Container maxWidth="sm">
Loading