From da961c34a734760ca32978ead4b9947b4b61486b Mon Sep 17 00:00:00 2001 From: Bryan Ashby Date: Sun, 16 Jun 2019 11:01:58 -0600 Subject: [PATCH] Add docs on template files --- art/themes/luciano_blocktronics/2FAOTP.ans | Bin 0 -> 295 bytes docs/modding/user-2fa-otp-config.md | 20 ++++++++++++++++++++ misc/otp_register_email.template.html | 11 +++++++++++ misc/otp_register_email.template.txt | 7 +++++++ www/otp_register.template.html | 8 ++++---- 5 files changed, 42 insertions(+), 4 deletions(-) create mode 100644 art/themes/luciano_blocktronics/2FAOTP.ans create mode 100644 misc/otp_register_email.template.html create mode 100644 misc/otp_register_email.template.txt diff --git a/art/themes/luciano_blocktronics/2FAOTP.ans b/art/themes/luciano_blocktronics/2FAOTP.ans new file mode 100644 index 0000000000000000000000000000000000000000..7828fe6af5c6ce89ac5b0594c308c72988affcaf GIT binary patch literal 295 zcmb1+Hn27^ur@Z&<$?j}XhTD1>1boKTz@}Tg%D3)SA_t_;9v!yxV5oCu9Y-U3s4fs zH#W>wbqz5DN`PrDE}&GdbhIT0fnr#lU0c?yWmsGH0sI#kqfdch_k%6J5ftjJ%CI$uuM#caJ U9v}?_!k$jP3SsV!5FVTa039wl#Q*>R literal 0 HcmV?d00001 diff --git a/docs/modding/user-2fa-otp-config.md b/docs/modding/user-2fa-otp-config.md index 5b0f045d..7b41939f 100644 --- a/docs/modding/user-2fa-otp-config.md +++ b/docs/modding/user-2fa-otp-config.md @@ -51,3 +51,23 @@ The following MCI codes are available: * MCI 3: (ie: `TM3`): Submit/cancel toggle. * MCI 10...99: Custom entries with the following format members available: * `{infoText}`: **Info Text** for current selection. + +### Web and Email Templates +A template system is also available to customize registration emails and the landing page. + +#### Emails +Multipart MIME emails are send built using template files pointed to by `users.twoFactorAuth.otp.registerEmailText` and `users.toFactorAuth.otp.registerEmailHtml` supporting the following variables: +* `%BOARDNAME%`: BBS name. +* `%USERNAME%`: Username receiving email. +* `%TOKEN%`: Temporary registration token generally used in URL. +* `%REGISTER_URL%`: Full registration URL. + +#### Landing Page +The landing page template is pointed to by `users.twoFactorAuth.otp.registerPageTemplate` and supports the following variables: +* `%BOARDNAME%`: BBS name. +* `%USERNAME%`: Username receiving email. +* `%TOKEN%`: Temporary registration token generally used in URL. +* `%OTP_TYPE%`: OTP type such as `googleAuth`. +* `%POST_URL%`: URL to POST form to. +* `%QR_IMG_DATA%`: QR code in URL image data format. Not always available depending on OTP type and will be set to blank in these cases. +* `%SECRET%`: Secret for manual entry. diff --git a/misc/otp_register_email.template.html b/misc/otp_register_email.template.html new file mode 100644 index 00000000..f9fcd65b --- /dev/null +++ b/misc/otp_register_email.template.html @@ -0,0 +1,11 @@ +%USERNAME%:
+
+

+ You have requested to enable 2-Factor Authentication via One-Time-Password for your account on %BOARDNAME%.
+

+

+ If this was not you, please ignore this email and consider changing your password. Otherwise, please follow this link or copy and paste the link below:

+ %REGISTER_URL%
+

+ + diff --git a/misc/otp_register_email.template.txt b/misc/otp_register_email.template.txt new file mode 100644 index 00000000..c275515e --- /dev/null +++ b/misc/otp_register_email.template.txt @@ -0,0 +1,7 @@ +%USERNAME%: + +You have requested to enable 2-Factor Authentication via One-Time-Password for your account on %BOARDNAME%. + +If this was not you, please ignore this email and consider changing your password. Otherwise, please follow the link below: + +%REGISTER_URL% diff --git a/www/otp_register.template.html b/www/otp_register.template.html index 90eeba16..20a63ed2 100644 --- a/www/otp_register.template.html +++ b/www/otp_register.template.html @@ -1,11 +1,11 @@ - - + + Enable 2FA/OTP — ENiGMA½ BBS - - + +

Your OTP secret: