History: Two-factor authentication
Source of version: 13 (current)
Copy to clipboard
^ See also: ((PluginTOTP)) ^ Two-Factor Authentication (2FA) is a security mechanism that requires users to provide two different authentication factors to verify their identity. This significantly enhances security by adding an extra layer of protection beyond just a password. Starting with [https://doc.tiki.org/Tiki21|Tiki 21], 2FA was introduced to strengthen the security of user accounts during authentication, helping to prevent [https://en.wikipedia.org/wiki/SIM_swap_scam|SIM Swap Scam]. Tiki uses [https://packagist.org/packages/pragmarx/google2fa|pragmarx/google2fa], a PHP implementation of two widely used algorithms for generating one-time passwords (OTPs) in 2FA systems: TOTP (Time-based One-time Password) - open standard documented in [https://datatracker.ietf.org/doc/html/rfc6238|RFC 6238]. TOTP is similar to HOTP but incorporates a time factor. * Algorithm: Based on HOTP * Input: Secret key + Current timestamp * Output: 6-8 digit numeric code * Validity: Typically 30 seconds * Use Case: Real-time applications requiring immediate validation. HOTP (HMAC-based One-time Password). - [https://datatracker.ietf.org/doc/html/rfc4226|RFC 4226] HOTP generates a one-time password using a secret key and a counter. * Algorithm: Based on HMAC-SHA1 * Input: Secret key + Counter value * Output: 6-8 digit numeric code * Validity: Until used (not time-dependent) * Use Case: Ideal for systems where time synchronization isn't critical or possible Tiki primarily uses TOTP, which offers several advantages: # Enhanced Security: Protects against unauthorized access even if passwords are compromised. # Flexibility: TOTP adds an additional layer of security by being time-based # Cross-Platform Compatibility: Supported by a wide range of devices and applications. # User-Friendly: Easy to implement and use with mobile apps like Google Authenticator. # Compliance: Helps meet regulatory requirements for secure authentication. # And you can even use another Tiki instance via [https://doc.tiki.org/PluginTOTP|PluginTOTP]. {img src="display1701" link="display1701" width="700" rel="box[g]" imalign="center" alt="Two Factor Authentication Steps" desc="Click to expand" align="center" styleimage="border"} !! Steps __Step 1:__ First enable the “Allow users to use 2FA” option in the "Log In" feature in your Tiki, go to __Settings__ → __Control Panels__ → __Log In__ → __General Preferences__ tab “tiki-admin.php?page=login#contentadmin_login-1" (e.g ~np~http://www.example.com/tiki-admin.php?page=login#contentadmin_login-1~/np~) with “Preference Filters” to Avanced. {img src="display1700" link="display1700" alt="Allow users to use 2FA" width="700" rel="box[g]" imalign="center" desc="Click to expand" align="center" styleimage="border"} __Step 2:__ Next, install Google Authenticator® App on your mobile phone. [https://support.google.com/accounts/answer/1066447?co=GENIE.Platform%3DAndroid&hl=en|See how to install it here]. __Step 3:__ Check the “Enable two-factor authentication” option in the “User Preferences” page, the “Account Information” tab and click on “Save changes” button. Note that the current password is required to make changes. At this step, you need to connect Tiki and the Google Authenticator® application by scanning the QR Code generated in the “User Preferences” page. Click on "Show QRCode" to display the QR Code, scan it using the application you installed in step 2. {img src="display1698" link="display1698" width="700" rel="box[g]" imalign="center" alt="Tiki Enable two-factor authentication" desc="Click to expand" align="center" styleimage="border"} __Step 4:__ Finally, when authenticating on page "Log In” (e.g. ~np~http://www.example.com/tiki-login_scr.php?twoFactorForm~/np~), take the code generated by Google Authenticator® App and enter it in the field “Two-factor Authenticator Code”. {img src="display1702" link="display1702" width="500" alt="Tiki TWo Factor Authentication Login" rel="box[g]" imalign="center" desc="Click to expand" align="center" styleimage="border"} By adhering to standardized algorithms like TOTP and HOTP, 2FA solutions become both secure and flexible. These methods make user authentication robust and effective. !! Related links * Original commit: [http://sourceforge.net/p/tikiwiki/code/70793] -=Page aliases=- * (alias(2FA))