twofactor_yubikey
twofactor_yubikey copied to clipboard
PHP: each() is deprecated
The Yubico Plugin spawns a little PHP warning if using PHP >= 7.2 (which basically means any version that is currently fully supported, as PHP 7.1 is down to security only.
The each() function is deprecated. This message will be suppressed on further calls at apps/twofactor_yubikey/vendor/auth_yubico/Yubico.php#395
This is an issue with the Yubico library. There is a fix in the gifu development version but not in the current release version. I will look at migrating to the development version. Hopefully the api remains the dame.
I have always used https://github.com/multiOTP/yubicloud-class-php for my yubicloud business, also because it diesnt depend on anything, the business seems the same as described.
- include/require the file
- create a new instance
- feed it your api data
- feed it your OTPs and take the response
just the reply handling seems a bit different. 'OK'
means valid the rest is an error
Upgraded the Yubico library.
Ther are a couple of minor usage changes, the useSSL flag now has no function and the authentication server needs to be specified as a full URL (instead of just host/path previously)
I think this is working. I had a few issues originally but that could have been my Internet connection as it seems solid now with no changes to the server interaction layer.
Hello, I have the same problem. If I activate the app and enter API information, the registration will work properly. However, as soon as a user wants to remove the key, the following error message appears:
Undefined property: OCA\TwoFactor_Yubikey\Service\Yubiotp::$provider at /var/www/nextcloud/apps/twofactor_yubikey/lib/Service/Yubiotp.php#182
and
TypeError: Argument 1 passed to OC\Authentication\TwoFactorAuth\Registry::disableProviderFor() must implement interface OCP\Authentication\TwoFactorAuth\IProvider, null given, called in /var/www/nextcloud/apps/twofactor_yubikey/lib/Service/Yubiotp.php on line 182
and The each() function is deprecated. This message will be suppressed on further calls at /var/www/nextcloud/apps/twofactor_yubikey/vendor/auth_yubico/Yubico.php#395
The user will not be able to log in afterwards because Nextcloud requires authentication with YubiKey How can I fix that?