mirror of
https://github.com/certd/certd.git
synced 2026-05-16 21:27:34 +08:00
Merge branch 'v2-dev' of https://github.com/certd/certd into v2-dev
This commit is contained in:
@@ -278,20 +278,22 @@ async function doRegisterPasskey(deviceName: string) {
|
||||
// type: "public-key",
|
||||
// }));
|
||||
|
||||
const credential = await (navigator.credentials as any).create({
|
||||
publicKey: {
|
||||
challenge: Uint8Array.from(atob(options.challenge.replace(/-/g, "+").replace(/_/g, "/")), c => c.charCodeAt(0)),
|
||||
rp: options.rp,
|
||||
pubKeyCredParams: options.pubKeyCredParams,
|
||||
timeout: options.timeout || 60000,
|
||||
attestation: options.attestation,
|
||||
// excludeCredentials: excludeCredentials,
|
||||
user: {
|
||||
id: new TextEncoder().encode(options.userId + ""),
|
||||
name: userInfo.value.username,
|
||||
displayName: deviceName,
|
||||
},
|
||||
const publicKey = {
|
||||
challenge: Uint8Array.from(atob(options.challenge.replace(/-/g, "+").replace(/_/g, "/")), c => c.charCodeAt(0)),
|
||||
rp: options.rp,
|
||||
pubKeyCredParams: options.pubKeyCredParams,
|
||||
timeout: options.timeout || 60000,
|
||||
attestation: options.attestation,
|
||||
// excludeCredentials: excludeCredentials,
|
||||
user: {
|
||||
id: new TextEncoder().encode(options.userId + ""),
|
||||
name: userInfo.value.username,
|
||||
displayName: deviceName,
|
||||
},
|
||||
};
|
||||
console.log("passkey register publicKey:", publicKey);
|
||||
const credential = await (navigator.credentials as any).create({
|
||||
publicKey,
|
||||
});
|
||||
|
||||
if (!credential) {
|
||||
|
||||
@@ -100,7 +100,10 @@ function formatDate(dateStr: string): string {
|
||||
.cert-detail {
|
||||
table {
|
||||
width: 100%;
|
||||
table-layout: fixed;
|
||||
table-layout: fixed !important;
|
||||
}
|
||||
.ant-descriptions-item-label {
|
||||
width: 90px;
|
||||
}
|
||||
.fingerprint {
|
||||
.label {
|
||||
|
||||
Reference in New Issue
Block a user