An open API service indexing awesome lists of open source software.

https://github.com/joho1968/cloudbridge-2fa

Uncomplicated 2FA plugin for WordPress
https://github.com/joho1968/cloudbridge-2fa

2fa php php7 php8 php80 php81 security wordpress wordpress-plugin wordpress-security wordpress5 wordpress6

Last synced: 20 days ago
JSON representation

Uncomplicated 2FA plugin for WordPress

Awesome Lists containing this project

README

          

[![Software License](https://img.shields.io/badge/License-GPL%20v2-green.svg?style=flat-square)](LICENSE) [![PHP 7.4\+](https://img.shields.io/badge/PHP-7.4-blue?style=flat-square)](https://php.net) [![PHP 8.1\+](https://img.shields.io/badge/PHP-8.1-blue?style=flat-square)](https://php.net) [![PHP 8.2\+](https://img.shields.io/badge/PHP-8.2-blue?style=flat-square)](https://php.net) [![PHP 8.3\+](https://img.shields.io/badge/PHP-8.3-blue?style=flat-square)](https://php.net) [![PHP 8.4\+](https://img.shields.io/badge/PHP-8.4-blue?style=flat-square)](https://php.net) [![WordPress 5.5](https://img.shields.io/badge/WordPress-5.5-orange?style=flat-square)](https://wordpress.org) [![WordPress 6](https://img.shields.io/badge/WordPress-6.9-orange?style=flat-square)](https://wordpress.org)

# Cloudbridge 2FA

Uncomplicated 2FA for WordPress with e-mail OTP and authenticator app support.

## Description
![Cloudbridge 2FA banner](/banner/Cloudbridge-2FA-banner-1544x500.png?raw=true "Cloudbridge 2FA banner")

This plugin provides uncomplicated 2FA functionality for WordPress. It will allow
you to require a second, one time password or OTP, code to be entered when certain
(or all) users attempt to log in to WordPress.

It supports two factor methods:

* six-digit codes sent by e-mail
* standards-based authenticator apps using TOTP

The e-mail code has a limited lifetime (defaults to 15 minutes). Once a code has
been consumed, it is considered invalid.

Authenticator app setup is handled from the user's own profile page. The plugin
provides a QR code, a manual setup key, and recovery codes for when the
authenticator app is not available.

You may configure that only certain roles are required to use 2FA, and it is
recommended that you enable 2FA for those users with privileged access.

You may also configure the plugin to allow certain roles to enable an OTP code
bypass, which will set a cookie in that user's web browser. The cookies are
partially based on the username, so several users can share the same browser,
but still be required to always enter the OTP code, or bypass it if the cookie
is present.

You can add custom text to the OTP code entry form, and you can add custom text
to the OTP code e-mail message.

The plugin can be configured to allow it to be handled/managed only by specific
users, thus making it harder for someone to accidentally or intentionally
deactivate it. The implemented solution for this is by no means waterproof. If
someone, for example, has access to your WordPress installation by means of FTP
or similar, the plugin files can be physically removed (or moved out of your
WordPress installation), which basically deactivates the plugin as well.

## Installation

This section describes how to install the plugin and get it working.

1. Upload the contents of the `cloudbridge-2fa` folder to the `/wp-content/plugins/` directory
2. Activate the plugin through the 'Plugins' menu in WordPress
3. Configure the plugin settings

## Is the plugin locale aware

Cloudbridge 2FA uses standard WordPress functionality to handle localization/locale. The native language localization of the plugin is English. It has been translated to Swedish by the author.

## Are there any incompatibilities

This is a hard question to answer. There are no known incompatibilities.

## Changelog

### 2.0.1
* Fixed a settings-page regression where saving one tab could unset values on another tab
* Fixed the Bypass 2FA tab layout after the recent admin UI changes
* Restored returning to the active settings tab after saving
* Sent expired or stale login verification attempts back to the WordPress login screen so the user can start over cleanly

### 2.0.0
* Verified with PHP 7.4, 8.1, 8.2, 8.3, and 8.4
* Added authenticator app support using standards-based TOTP
* Added recovery codes for authenticator-enabled accounts
* Added QR code and manual setup key support to the user profile
* Reworked the admin settings so authenticator-app and e-mail OTP settings are easier to find
* Hardened redirect handling in login and OTP completion flows
* Added CSRF protection to configuration import

### 1.0.5
* Verified with WordPress 6.8 and 6.9

### 1.0.4
* Verified with WordPress 6.7
* Verified with Plugin Check (PCP)
* Corrected some checks for `uninstall.php` and made it more WP-CLI compatible

### 1.0.3
* Fix some incorrect links in plugin and `README.md`

### 1.0.2
* Fix of minor PHP warning

### 1.0.1
* Fix of minor PHP warning

### 1.0.0
* Initial release

## Screenshots
![Cloudbridge 2FA login screen](/screenshots/cloudbridge-2fa-screenshot-login.png?raw=true "Cloudbridge 2FA login screen")

![Cloudbridge 2FA OTP code e-mail](/screenshots/cloudbridge-2fa-screenshot-email.png?raw=true "Cloudbridge 2FA OTP e-mail")

## License

Please see [LICENSE](LICENSE) for a full copy of GPLv2

Copyright (C) 2024-2026 [Joaquim Homrighausen](https://github.com/joho1968).

This file is part of Cloudbridge 2FA (CB2FA). Cloudbridge 2FA is free software.

You may redistribute it and/or modify it under the terms of the GNU General Public License version 2, as published by the Free Software Foundation.

Cloudbridge 2FA is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with the SCFA package. If not, write to:

```
The Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor
Boston, MA 02110-1301, USA.
```

## Credits

The Cloudbridge 2FA Plugin was written by Joaquim Homrighausen while converting :coffee: into code.

Cloudbridge 2FA is sponsored by [WebbPlatsen i Sverige AB](https://webbplatsen.se) :sweden:

Commercial support and customizations for this plugin is available from WebbPlatsen i Sverige AB in :sweden:

If you find this plugin useful, the author is happy to receive a donation, good review, or just a kind word.

If there is something you feel to be missing from this plugin, or if you have found a problem with the code or a feature, please do not hesitate to reach out to support@webbplatsen.se.

This plugin can also be downloaded from [code.webbplatsen.net](https://code.webbplatsen.net/wordpress/cloudbridge-2fa/) and [GitHub](https://github.com/joho1968/Cloudbridge-2FA)

More detailed documentation is available at [code.webbplatsen.net/documentation/cloudbridge-2fa](https://code.webbplatsen.net/documentation/cloudbridge-2fa/)

### External references

These links are not here for any sort of endorsement or marketing, they're purely for informational purposes.

* me; :monkey: https://joho.se and https://github.com/joho1968
* WebbPlatsen; https://webbplatsen.se and https://code.webbplatsen.net
* Kudos to Kev Quirk for [Simple CSS](https://simplecss.org/)
* QR code setup on the authenticated profile page uses QR Code Generator for JavaScript by Kazuhiko Arase (MIT license)

Stay safe!