Cookie 中的 Token: ❌ 不存在
解析的用户信息: 无法解析
未登录
方案 1:从 Cookie 读取(推荐)
const cookieStore = await cookies()
const token = cookieStore.get('auth_token')?.value方案 2:从 Header 读取
const headers = await headers()
const token = headers.get('authorization')?.replace('Bearer ', '')方案 3:使用 next-auth
const session = await getServerSession(authOptions)
const token = session?.accessTokenauth_tokeneyJ1c2VySWQiOiIxMjMiLCJ1c2VybmFtZSI6InRlc3R1c2VyIn0=(base64 编码的 JSON)