mirror of
https://github.com/lukin/keywind.git
synced 2025-01-10 01:46: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;
|
requireResidentKey: string;
|
||||||
rpEntityName: string;
|
rpEntityName: string;
|
||||||
rpId: string;
|
rpId: string;
|
||||||
signatureAlgorithms: string;
|
signatureAlgorithms: string[];
|
||||||
unsupportedBrowserText: string;
|
unsupportedBrowserText: string;
|
||||||
userId: string;
|
userId: string;
|
||||||
userVerificationRequirement: UserVerificationRequirement | 'not specified';
|
userVerificationRequirement: UserVerificationRequirement | 'not specified';
|
||||||
|
@ -61,16 +61,16 @@ document.addEventListener('alpine:init', () => {
|
||||||
username,
|
username,
|
||||||
} = this.$store.webAuthnRegister;
|
} = this.$store.webAuthnRegister;
|
||||||
|
|
||||||
const getPubKeyCredParams = (signatureAlgorithms: string) => {
|
const getPubKeyCredParams = (signatureAlgorithms: string[]) => {
|
||||||
const pubKeyCredParams: PublicKeyCredentialParameters[] = [];
|
const pubKeyCredParams: PublicKeyCredentialParameters[] = [];
|
||||||
|
|
||||||
if (signatureAlgorithms === '') {
|
if (signatureAlgorithms.length == 0) {
|
||||||
pubKeyCredParams.push({ alg: -7, type: 'public-key' });
|
pubKeyCredParams.push({ alg: -7, type: 'public-key' });
|
||||||
|
|
||||||
return pubKeyCredParams;
|
return pubKeyCredParams;
|
||||||
}
|
}
|
||||||
|
|
||||||
const signatureAlgorithmsList = signatureAlgorithms.split(',');
|
const signatureAlgorithmsList = signatureAlgorithms;
|
||||||
|
|
||||||
signatureAlgorithmsList.forEach((value) => {
|
signatureAlgorithmsList.forEach((value) => {
|
||||||
pubKeyCredParams.push({
|
pubKeyCredParams.push({
|
||||||
|
|
|
@ -44,7 +44,7 @@
|
||||||
requireResidentKey: '${requireResidentKey}',
|
requireResidentKey: '${requireResidentKey}',
|
||||||
rpEntityName: '${rpEntityName}',
|
rpEntityName: '${rpEntityName}',
|
||||||
rpId: '${rpId}',
|
rpId: '${rpId}',
|
||||||
signatureAlgorithms: '${signatureAlgorithms}',
|
signatureAlgorithms: [${signatureAlgorithms?join(",")}],
|
||||||
unsupportedBrowserText: '${msg("webauthn-unsupported-browser-text")?no_esc}',
|
unsupportedBrowserText: '${msg("webauthn-unsupported-browser-text")?no_esc}',
|
||||||
userId: '${userid}',
|
userId: '${userid}',
|
||||||
userVerificationRequirement: '${userVerificationRequirement}',
|
userVerificationRequirement: '${userVerificationRequirement}',
|
||||||
|
|
Loading…
Reference in a new issue