TOTPFit/app.js

20 lines
438 B
JavaScript
Raw Normal View History

2024-11-13 18:12:34 +03:00
import { TOTP } from "./lib/totp-quickjs"
import { LocalStorage } from "@zos/storage"
const localStorage = new LocalStorage()
App({
2024-11-13 18:12:34 +03:00
globalData: {
2024-11-19 19:30:11 +03:00
TOTPS: localStorage.getItem('TOTPs') || [
new TOTP('JBSWY3DPEHPK3PXPQ', 'totp.danhersam.com', 'I', 6, 30, 0, 'SHA-1')
]
},
2024-11-13 18:12:34 +03:00
onCreate(options) {
localStorage.setItem('TOTPs', [
2024-11-19 19:30:11 +03:00
])
2024-11-13 18:12:34 +03:00
},
onDestroy(options) {
console.log('app on destroy invoke')
}
})