Skip to content

Commit

Permalink
fix: rename generate qr code api to digits
Browse files Browse the repository at this point in the history
  • Loading branch information
Bekacru committed Dec 10, 2024
1 parent 5de38bb commit 81a425a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/otp.ts
Original file line number Diff line number Diff line change
Expand Up @@ -89,21 +89,21 @@ export function generateQRCode(
issuer,
account,
secret,
digit = defaultDigits,
digits = defaultDigits,
period = defaultPeriod,
}: {
issuer: string,
account: string,
secret: string,
digit?: number,
digits?: number,
period?: number,
}
) {
const url = new URL("otpauth://totp");
url.searchParams.set("secret", secret);
url.searchParams.set("issuer", issuer);
url.searchParams.set("account", account);
url.searchParams.set("digits", digit.toString());
url.searchParams.set("digits", digits.toString());
url.searchParams.set("period", period.toString());
return url.toString();
}

0 comments on commit 81a425a

Please sign in to comment.