- JavaScript 99.1%
- HTML 0.7%
- Makefile 0.2%
| images | Add theme screenshots | |
| langs | Translate label and issuer | |
| public | Embed DepartureMono font in the code | |
| webxdc | Repo moved to rtn | |
| .gitignore | Let there be code 🌱 | |
| app.js | Fix URL.pathname bug | |
| build.js | Let there be code 🌱 | |
| CHANGELOG.md | Update changelog | |
| convert.js | Let there be code 🌱 | |
| crypto.js | Add backup (reduce width of search input) | |
| font.js | Embed DepartureMono font in the code | |
| i18n.js | Themes ( #36 ) | |
| icons.js | Add neon green theme | |
| package-lock.json | 1.0.1 | |
| package.json | 1.0.1 | |
| README.md | Add theme screenshots | |
| style.js | Skip the color of the wrapper | |
| test.js | Let there be code 🌱 | |
| theme.js | Add neon green theme | |
totp
A web application for Time-Based One-Time Passwords.
Introduction
Time-Based One-Time Passwords (TOTP) are used during Two Factor Authentication (2FA). Some well known example applications are Google Authenticator and Authy. This is a FLOSS alternative implemented as a web application with the following additional features:
- Running it as a
webxdcapplication in e.g.DeltaChatallows you to securely synchronize your one-time passwords between all your devices. Attaching it to a group allows you to share them with the people in the group so you can have shared access to accounts. - Built as a standalone application in a self contained
index.htmlfile. You can download this file and run it locally in your browser. No servers needed and no external communication is made. - Tokens/secrets are stored in
indexedDBand can be exported toJSON. - Multi-lingual. Currently supports seven different languages.
- Multi-themed. Currently one dark mode and three light modes.
Getting Started
- Download
totp.xdcfile from release assets - Attach it to
Saved Messagesor to a group chat for shared access to 2FA accounts - Added or modified accounts will be shared with others in the same group
OR
- Download
index.htmlfile from release assets - Open it in your local browser
UI
Overview
Here's a brief overview of what the UI looks like and some functions.
Annotated account lista- Backup / export button. Will export a.jsonfile to a channel if running inwebxdcmode. It'll save a copy of it in your downloads folder if running in a normal browser.b- Expand all acounts in the list.c- Collapse all acounts in the list.d- Open theLanguagedialog.e- Cycle through the different themes.f- Search field. Searches all account names in lower case and alsolabelandissuerif specified.g- Account name.h- Account code. Click to copy it to clipboard.i- Expand / collapse account.j- Re-send / broadcast the account (webxdconly)k- Delete account. Will delete the account fromindexedDB. If running inwebxdcmode andindexedDBandlocalStorageis cleared, it will be reloaded once again from all updates.l- Edit accountname.m- Expire time. The circle is showing percentage and the text is number of seconds left until the token is renewed.n- Additional parameters about the account.Algorithm- Possible values areSHA1(default),SHA256andSHA512Period- Refresh period. Must be between20and120seconds. Default is30.Digits- Number of digits in the code. Must be between6and8. Default is6.Label- Label provided by the issuer. Optional string when key is given as aotpauth://url.Issuer- Token issuer. Optional string when key is given as aotpauth://url.
o- Open theAdd Accountdialog.
Screens
| Screen | Description | Screen |
|---|---|---|
No Accounts |
When you start the application the first time there will be no accounts. Click the plus button in the bottom right corner to open the Add Account dialog. |
|
Add Account |
An account has two pieces of data:
If the key is in the form of a The The yellow field at the bottom will let you know if there's something wrong with the input. |
|
Accounts |
When you have added a few accounts the main view could look something like this. Each account in the list shows the Some features:
|
|
Edit Account |
Editing the account only allows you to change the name. The name has to be non empty and doesn't have to be unique. |
|
Language |
The language dialog allows you to pick the UI language. By default it picks the value from the browser (navigator.language). So if your device has French as locale, this will be used. This setting is persisted. |
Themes
Theme 1 Theme 2 Theme 3 Theme 4Links
Some links and reference material.
RFC 6238 - TOTP: Time-Based One-Time Password AlgorithmRFC 4226 - HOTP: An HMAC-Based One-Time Password AlgorithmUsage specification of the otpauth URI format for TOTP and HOTP token generators
Develop
Working on the code and running it locally
$ git clone git@codeberg.org:rtn/totp.git
$ cd totp
$ npm install
$ npm start # open http://localhost:3333
As an alternative to npm start you can also run it within webxdc-dev which gives you a bit nicer environment closer to the real webxdc scenario:
$ npm run start:webxdc
License
GPLv3