- PHP 57.4%
- JavaScript 30.9%
- Python 7.6%
- CSS 2.7%
- Shell 1.4%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
|
|
||
| .wordpress-org | ||
| bin | ||
| i18n | ||
| tblid | ||
| tests | ||
| .gitignore | ||
| LICENSE | ||
| README-nl.md | ||
| README.md | ||
TBLID – Touch Biometric Login (WordPress plugin)
English | Nederlands
Log in without a password. Scan the QR code with the TBLID app and confirm with your fingerprint. Live at https://tblid.nl. The Android app lives in 12Tree/tblid-android.
Layout
| Path | Contents |
|---|---|
tblid/ |
The plugin itself, exactly as it goes to wordpress.org (trunk) |
i18n/ |
tblid.pot plus the Dutch translation (.po, .mo, .l10n.php) |
.wordpress-org/ |
Icon, banner and screenshots for the plugin page on wordpress.org (SVN folder assets/) |
tests/ |
sim_app.py (protocol test, simulates the app) and e2e_account.py (browser test of the account page) |
bin/build-zip.sh |
Builds build/tblid.zip |
bin/svn-release.sh |
Publishes a version on wordpress.org (only after approval) |
How it works
- Linking: on the account page (
[tblid_account]) or the wp-admin profile, click "Link my phone". You get a QR code with…/wp-json/tblid/v2/e?t=<token>; the token is valid for 10 minutes and works only once.- The app creates an EC P-256 key in the Android Keystore that can only be used after a fingerprint check.
- The app signs
TBLID2-ENROLL|<host>|<token>and sends the public key along.
- Logging in: the login page requests a session via
POST /tblid/v2/session. The site sets an HttpOnly cookie with a browser secret.- The QR code contains
…/l?s=<sid>&c=<challenge>. - The app shows the site, browser and IP (
action=info), asks for your fingerprint and signsTBLID2-LOGIN|<host>|<sid>|<challenge>. If you decline, it signsTBLID2-DENY|…. - The browser polls
POST /tblid/v2/status. Only the browser with the right cookie is logged in, and only once.
- The QR code contains
- Data:
- sessions are stored in the table
{prefix}tblid_sessions2, live for 2 minutes and are cleaned up by an hourly cron; - linked phones are stored in the user meta
tblid_cred_<id>; - settings are stored in the option
tblid_settings.
- sessions are stored in the table
- On the phone itself: the "Open in TBLID app" button uses the same URL with
tblid://instead ofhttps://. - Multilingual sites: with Polylang or WPML, the account page and the app download link follow the visitor's language (filter
wpml_object_id, since 2.2.1). The download link can also be changed with thetblid_app_urlfilter.
Testing
# protocol test (create an enroll token on the site):
wp eval 'echo TBLID_Credentials::enroll_start(<user_id>);'
python3 tests/sim_app.py https://tblid.nl <token>
# browser test: sign up, link a phone, wp-admin blocked, QR login, unlink
# (creates a test user e2etest…; remove it afterwards with wp user delete)
python3 tests/e2e_account.py https://tblid.nl
Plugin Check (the official wordpress.org check): wp plugin install plugin-check --activate && wp plugin check tblid. For 2.2.0 it reported no errors and no warnings.
Translations
The source strings are English. After a change, update the translations like this:
wp i18n make-pot tblid i18n/tblid.pot --slug=tblid --domain=tblid --exclude=assets/js/qrcode.js
msgmerge -U i18n/tblid-nl_NL.po i18n/tblid.pot # translate, then:
msgfmt -o i18n/tblid-nl_NL.mo i18n/tblid-nl_NL.po
wp i18n make-php i18n
The plugin does not load translations itself (wordpress.org requires that). On your own site, put tblid-nl_NL.mo and tblid-nl_NL.l10n.php in wp-content/languages/plugins/. Once the plugin is on wordpress.org, the translation comes from translate.wordpress.org: import i18n/tblid-nl_NL.po there.
To wordpress.org
- Create an account on wordpress.org, enable two-factor authentication and put your username under
Contributors:intblid/readme.txt(it currently saysrsquare). - Run
bin/build-zip.shand uploadbuild/tblid.zipat https://wordpress.org/plugins/developers/add/ (preferred slug:tblid). - Wait for the review (usually a few weeks). Apply the feedback in this repo and send a new zip.
- After approval:
bin/svn-release.sh <wp.org-username>. This putstblid/in trunk, tags the version and puts the images from.wordpress-org/on the plugin page. - Ask on translate.wordpress.org to import the Dutch translation (
i18n/tblid-nl_NL.po).
For every new version, bump Version: in tblid/tblid.php, TBLID_VERSION and Stable tag: in readme.txt. Also update the changelog in readme.txt.
Note: the reviewers want to be able to test the plugin, so the app has to be downloadable, preferably from Google Play. Until then the plugin links by default to the (not yet existing) Play Store page of nl.tblid.login. On tblid.nl the download link points to the site's own download page (TBLID → Settings).