Compare commits
3 Commits
b73abf2fa2
...
6b4b511d66
| Author | SHA1 | Date | |
|---|---|---|---|
| 6b4b511d66 | |||
| 9dabbd60ea | |||
| ba0b145bda |
@@ -12,7 +12,7 @@ const RegistrationRequest = async ({ method, prefix, params, headers = {} }) =>
|
||||
'Accept-Language': 'en_US',
|
||||
...headers,
|
||||
},
|
||||
// withCredentials: true,
|
||||
withCredentials: true,
|
||||
});
|
||||
|
||||
return response.data || {};
|
||||
|
||||
@@ -40,15 +40,15 @@ const SignIn = () => {
|
||||
password: values.password,
|
||||
captcha: values.captcha,
|
||||
captchaText: captchaText,
|
||||
}
|
||||
},
|
||||
withCredentials: true
|
||||
});
|
||||
|
||||
const user = res?.data?.user || res?.user;
|
||||
const tokens = res?.data?.tokens || res?.tokens;
|
||||
const accessToken = res?.data?.accessToken || res?.tokens?.accessToken;
|
||||
|
||||
if (user && tokens?.accessToken) {
|
||||
localStorage.setItem('token', tokens.accessToken);
|
||||
localStorage.setItem('refreshToken', tokens.refreshToken);
|
||||
if (user && accessToken) {
|
||||
localStorage.setItem('token', accessToken);
|
||||
localStorage.setItem('user', JSON.stringify(user));
|
||||
|
||||
NotifOk({
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { useEffect, useState } from 'react';
|
||||
import { Card, Typography, Flex } from 'antd';
|
||||
import { ReactSVG } from 'react-svg';
|
||||
// import { ReactSVG } from 'react-svg';
|
||||
import { setValSvg } from '../../components/Global/MqttConnection';
|
||||
|
||||
const { Text } = Typography;
|
||||
|
||||
Reference in New Issue
Block a user