fix: fixed parse of issuer

This commit is contained in:
Pavel-Savely Savianok 2025-02-26 02:28:30 +03:00
parent 096051b49d
commit 8ab87fe8e9
3 changed files with 6 additions and 2 deletions

View File

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

View File

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

View File

@ -23,6 +23,10 @@ export function getTOTPByLink(link) {
issuer = issuer.replace("%20", " "); issuer = issuer.replace("%20", " ");
client = client.replace("%20", " "); client = client.replace("%20", " ");
if(issuer == client){
issuer = args[3].split("issuer=")[1]?.split("&")[0]
}
return new TOTP( return new TOTP(
secret, secret,
issuer, issuer,