fix: final fix of parsing issuer and client
This commit is contained in:
parent
ca342bf6e4
commit
ccfd422061
2
app.json
2
app.json
@ -6,7 +6,7 @@
|
|||||||
"appType": "app",
|
"appType": "app",
|
||||||
"version": {
|
"version": {
|
||||||
"code": 1,
|
"code": 1,
|
||||||
"name": "1.1.2"
|
"name": "1.1.3"
|
||||||
},
|
},
|
||||||
"icon": "icon.png",
|
"icon": "icon.png",
|
||||||
"vender": "zepp",
|
"vender": "zepp",
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "totpfit",
|
"name": "totpfit",
|
||||||
"version": "1.1.2",
|
"version": "1.1.3",
|
||||||
"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",
|
||||||
|
@ -24,8 +24,8 @@ export function getTOTPByLink(link) {
|
|||||||
issuer = args[3].split("issuer=")[1]?.split("&")[0]
|
issuer = args[3].split("issuer=")[1]?.split("&")[0]
|
||||||
}
|
}
|
||||||
|
|
||||||
issuer = issuer.replace("%20", " ");
|
issuer = decodeURIComponent(issuer);
|
||||||
client = client.replace("%20", " ");
|
client = decodeURIComponent(client);
|
||||||
|
|
||||||
return new TOTP(
|
return new TOTP(
|
||||||
secret,
|
secret,
|
||||||
@ -37,6 +37,7 @@ export function getTOTPByLink(link) {
|
|||||||
getHashType(algorithm)
|
getHashType(algorithm)
|
||||||
);
|
);
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
|
console.log(err)
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user