fix UI
This commit is contained in:
@@ -20,7 +20,7 @@ export const useWebAuthStore = defineStore("webauth", () => {
|
||||
try {
|
||||
// 1. 从后端获取注册选项 (Creation Options)
|
||||
const res = await request.get("/profile/passkey");
|
||||
console.log("begin:", res.data.data.publicKey);
|
||||
// console.log("begin:", res.data.data.publicKey);
|
||||
const options = res.data.data.publicKey;
|
||||
|
||||
// 调用 Web Authentication API 进行注册
|
||||
@@ -44,7 +44,7 @@ export const useWebAuthStore = defineStore("webauth", () => {
|
||||
|
||||
// 3. 将注册结果 (Attestation) 发送到后端进行验证和保存
|
||||
const res2 = await request.post("/profile/passkey", attestation);
|
||||
console.log("end:", res2);
|
||||
// console.log("end:", res2);
|
||||
return res2;
|
||||
} catch (err) {
|
||||
error.value =err.response?.data?.error || "添加 Passkey 失败,请稍后重试。";
|
||||
|
||||
Reference in New Issue
Block a user