fix: final fix of parsing issuer and client

This commit is contained in:
Pavel-Savely Savianok 2025-02-26 02:46:16 +03:00
parent ca342bf6e4
commit ccfd422061
3 changed files with 5 additions and 4 deletions

View File

@ -6,7 +6,7 @@
"appType": "app",
"version": {
"code": 1,
"name": "1.1.2"
"name": "1.1.3"
},
"icon": "icon.png",
"vender": "zepp",

View File

@ -1,6 +1,6 @@
{
"name": "totpfit",
"version": "1.1.2",
"version": "1.1.3",
"description": "Another 2FAuthenticator based on TOTP for Zepp Amazfit GTS 4",
"main": "app.js",
"author": "Lisoveliy",

View File

@ -24,8 +24,8 @@ export function getTOTPByLink(link) {
issuer = args[3].split("issuer=")[1]?.split("&")[0]
}
issuer = issuer.replace("%20", " ");
client = client.replace("%20", " ");
issuer = decodeURIComponent(issuer);
client = decodeURIComponent(client);
return new TOTP(
secret,
@ -37,6 +37,7 @@ export function getTOTPByLink(link) {
getHashType(algorithm)
);
} catch (err) {
console.log(err)
return null;
}
}