mirror of
https://github.com/lukin/keywind.git
synced 2025-01-09 09:26:24 +00:00
fix: Template error #101
This commit is contained in:
parent
bdf966fdae
commit
3339aa5304
2 changed files with 5 additions and 5 deletions
|
@ -26,7 +26,7 @@ type StoreType = {
|
|||
requireResidentKey: string;
|
||||
rpEntityName: string;
|
||||
rpId: string;
|
||||
signatureAlgorithms: string;
|
||||
signatureAlgorithms: string[];
|
||||
unsupportedBrowserText: string;
|
||||
userId: string;
|
||||
userVerificationRequirement: UserVerificationRequirement | 'not specified';
|
||||
|
@ -61,16 +61,16 @@ document.addEventListener('alpine:init', () => {
|
|||
username,
|
||||
} = this.$store.webAuthnRegister;
|
||||
|
||||
const getPubKeyCredParams = (signatureAlgorithms: string) => {
|
||||
const getPubKeyCredParams = (signatureAlgorithms: string[]) => {
|
||||
const pubKeyCredParams: PublicKeyCredentialParameters[] = [];
|
||||
|
||||
if (signatureAlgorithms === '') {
|
||||
if (signatureAlgorithms.length == 0) {
|
||||
pubKeyCredParams.push({ alg: -7, type: 'public-key' });
|
||||
|
||||
return pubKeyCredParams;
|
||||
}
|
||||
|
||||
const signatureAlgorithmsList = signatureAlgorithms.split(',');
|
||||
const signatureAlgorithmsList = signatureAlgorithms;
|
||||
|
||||
signatureAlgorithmsList.forEach((value) => {
|
||||
pubKeyCredParams.push({
|
||||
|
|
|
@ -44,7 +44,7 @@
|
|||
requireResidentKey: '${requireResidentKey}',
|
||||
rpEntityName: '${rpEntityName}',
|
||||
rpId: '${rpId}',
|
||||
signatureAlgorithms: '${signatureAlgorithms}',
|
||||
signatureAlgorithms: [${signatureAlgorithms?join(",")}],
|
||||
unsupportedBrowserText: '${msg("webauthn-unsupported-browser-text")?no_esc}',
|
||||
userId: '${userid}',
|
||||
userVerificationRequirement: '${userVerificationRequirement}',
|
||||
|
|
Loading…
Reference in a new issue