6 Commits

4 changed files with 47 additions and 47 deletions

View File

@@ -4,9 +4,9 @@
![alt text](docs/assets/image2.png) ![alt text](docs/assets/image2.png)
### Features: ### Features:
- Supports of otpauth links with parameters "issuer", "algorithm", "digits", "period" - Supports of ```otpauth://``` links with parameters "client", "issuer", "algorithm", "digits", "period", "offset"
- Addition/Edition/Deletion of TOTPs from mobile app - Addition/Edition/Deletion of TOTPs from mobile app
- Support of google migration links formated: ```otpauth-migration://offline?data=...``` - Support of Google Authenticator migration links formated: ```otpauth-migration://offline?data=...``` (At this stage with only 6 digits and only 30 seconds period)
### Guides: ### Guides:

View File

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

View File

@@ -1,6 +1,6 @@
{ {
"name": "totpfit", "name": "totpfit",
"version": "1.3", "version": "1.3.0",
"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

@@ -31,7 +31,7 @@ function getByOtpauthScheme(link){
args[3].split(":")[0]?.split("?")[0]; //Returns client args[3].split(":")[0]?.split("?")[0]; //Returns client
let secret = args[3].split("secret=")[1]?.split("&")[0]; //Returns secret let secret = args[3].split("secret=")[1]?.split("&")[0]; //Returns secret
let period = args[3].split("period=")[1]?.split("&")[0]; //Returns period let period = args[3].split("period=")[1]?.split("&")[0]; //Returns period
let digits = args[3].split("digits=")[1]?.split("&")[0]; //Returns digits let digits = args[3].split("digit=")[1]?.split("&")[0]; //Returns digits
let algorithm = args[3].split("algorithm=")[1]?.split("&")[0]; //Returns algorithm let algorithm = args[3].split("algorithm=")[1]?.split("&")[0]; //Returns algorithm
let offset = args[3].split("offset=")[1]?.split("&")[0] ?? 0; //Returns offset let offset = args[3].split("offset=")[1]?.split("&")[0] ?? 0; //Returns offset
@@ -51,8 +51,8 @@ function getByOtpauthScheme(link){
secret, secret,
issuer, issuer,
client, client,
digits, Number(digits),
period, Number(period),
Number(offset), Number(offset),
getHashType(algorithm) getHashType(algorithm)
); );