[cm] feat: 인증 서비스에 "X-Device-Id" 적용

This commit is contained in:
2026-07-20 15:37:17 +09:00
parent 3b2f5c2d5d
commit aab8cf9622
3 changed files with 13 additions and 9 deletions
+1 -1
View File
@@ -12,7 +12,7 @@
"@common/assets": "workspace:*",
"@common/auth": "workspace:*",
"@common/components": "workspace:*",
"@common/config": "workspace:*",
"@common/network": "workspace:*",
"@dnd-kit/core": "^6.3.1",
"@dnd-kit/sortable": "^10.0.0",
"@dnd-kit/utilities": "^3.2.2",
+11 -3
View File
@@ -16,7 +16,7 @@ import {
setupRefreshTimer,
tokenManager,
} from "../lib/token-manager";
import { clearDeviceId } from "../lib/device-id";
import { clearDeviceId, getOrCreateDeviceId } from "../lib/device-id";
function resolveLoginError(message: string | undefined): string {
switch (message) {
@@ -46,7 +46,10 @@ function completeSession(accessToken: string, tokenId: string): void {
async function login(payload: AuthPayload): Promise<void> {
const response = await fetch(`/api/proxy${ENDPOINT.USER_SERVICE.LOGIN}`, {
method: "POST",
headers: { "Content-Type": "application/json" },
headers: {
"Content-Type": "application/json",
"X-Device-Id": getOrCreateDeviceId(),
},
body: JSON.stringify(payload),
});
@@ -71,7 +74,12 @@ async function silentRefresh(): Promise<void> {
try {
const response = await fetch(
`/api/proxy${ENDPOINT.USER_SERVICE.SILENT_REFRESH}`,
{ method: "PUT" },
{
method: "PUT",
headers: {
"X-Device-Id": getOrCreateDeviceId(),
},
},
);
const data = await response.json();
+1 -5
View File
@@ -22,12 +22,8 @@
"name": "next"
}
],
"baseUrl": "./src",
"paths": {
"@/*": ["./*"],
"@common/components": ["../../../packages/common/components/src/"],
"@common/config": ["../../../packages/common/config/dist/"],
"@common/network": ["../../../packages/common/network/"]
"@/*": ["./src/*"]
}
},
"include": [