Update totp.js

This commit is contained in:
Namhyeon Go 2024-11-26 02:03:15 +09:00 committed by GitHub
parent 400e904aa9
commit 69d7d3c632
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -25,7 +25,7 @@ function getPubKey() {
return result.data;
}
function getOtp() {
function getOtp(pubkey) {
var rpc = JsonRpc2.create("https://public-api.catswords.net");
var result = rpc.invoke("relay_invoke_method", {
"callback": "load_script",
@ -33,7 +33,7 @@ function getOtp() {
"https://raw.githubusercontent.com/dimamedia/PHP-Simple-TOTP-and-PubKey/refs/heads/master/class.tfa.php"
],
"args": [
"$tfa = new tfa(); return $tfa->getOtp()"
"$tfa = new tfa(); return $tfa->getOtp('" + pubkey + "')"
]
}, "");
@ -43,7 +43,7 @@ function getOtp() {
exports.getPubKey = getPubKey;
exports.getOtp = getOtp;
exports.VERSIONINFO = "TOTP library (totp.js) version 0.1.1";
exports.VERSIONINFO = "TOTP library (totp.js) version 0.1.2";
exports.AUTHOR = "abuse@catswords.net";
exports.global = global;
exports.require = global.require;