"use client"; import { useEffect, useState } from "react"; /** * 간단한 토큰 디버깅 페이지 */ export default function SimpleDebugPage() { const [tokenInfo, setTokenInfo] = useState({}); useEffect(() => { const token = localStorage.getItem("authToken"); const info = { hasToken: !!token, tokenLength: token ? token.length : 0, tokenStart: token ? token.substring(0, 30) + "..." : "없음", currentUrl: window.location.href, timestamp: new Date().toISOString(), }; setTokenInfo(info); console.log("토큰 정보:", info); }, []); return (

간단한 토큰 디버깅

토큰 상태

토큰 존재: {tokenInfo.hasToken ? "✅ 예" : "❌ 아니오"}

토큰 길이: {tokenInfo.tokenLength}

토큰 시작: {tokenInfo.tokenStart}

페이지 정보

현재 URL: {tokenInfo.currentUrl}

시간: {tokenInfo.timestamp}

테스트 버튼

); }