로그용 디바이스 아이디
This commit is contained in:
@@ -11,7 +11,9 @@ export enum StorageKeys {
|
||||
Requires2FA = 'REQUIRES_2FA',
|
||||
BottomBannerClose = 'BOTTOM_BANNER_CLOSE',
|
||||
RootStore = 'ROOT_STORE',
|
||||
|
||||
DeviceId = 'DEVICE_ID',
|
||||
AppVersion = 'APP_VERSION',
|
||||
LogOut = 'LOGOUT',
|
||||
|
||||
requestId = 'REQUEST_ID',
|
||||
|
||||
@@ -20,15 +22,14 @@ export enum StorageKeys {
|
||||
|
||||
HasBioHardware = 'HAS_BIO_HARDWARE',
|
||||
DeviceUniqueId = 'DEVICE_UNIQUE_ID',
|
||||
AppVersion = 'APP_VERSION',
|
||||
|
||||
AppColor = 'APP_COLOR',
|
||||
RedirectPath = 'REDIRECT_PATH',
|
||||
Platform = 'PLATFORM',
|
||||
AppPagingSpeed = 'APP_PAGING_SPEED', // deprecated
|
||||
ScannedQrCode = 'SCANNED_QR_CODE',
|
||||
HasPushTokenSent = 'HAS_PUSH_TOKEN_SENT',
|
||||
SetFont = 'SET_FONT',
|
||||
|
||||
LogOut = 'LOGOUT',
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
import { UAParser } from 'ua-parser-js';
|
||||
import { getLocalStorage } from '../lib';
|
||||
import { StorageKeys } from './local-storage';
|
||||
|
||||
const { origin } = window.location;
|
||||
export const CURRENT_URL = `${origin}`;
|
||||
@@ -28,8 +30,8 @@ export const getHeaderUserAgent = (options?: {
|
||||
|
||||
let os = result.os.name;
|
||||
let deviceType = result.device.type;
|
||||
let deviceID = 'uuid';
|
||||
let appVersion = '1.0.0';
|
||||
let deviceID = getLocalStorage(StorageKeys.DeviceId);
|
||||
let appVersion = getLocalStorage(StorageKeys.AppVersion);
|
||||
let browserInformation = result.browser.name;
|
||||
|
||||
return `${os} ${deviceType} ${deviceID} ${appVersion} ${browserInformation} ${options?.menuId || ''} ${options?.apiType || ''}`;
|
||||
|
||||
Reference in New Issue
Block a user