tilyanPristka / twofactor_duo

2FA DUO for Nextcloud Any Version (24, 25, 26, 27, 28, 29)
GNU Affero General Public License v3.0
1 stars 0 forks source link

2FA DUO for Nextcloud Any Versions

Experimental New Method Two-Factor DUO Universal Prompt (Duo Web SDK 4) for Nextcloud

Tested on Nextcloud versions 27, 28, and 29

Configuration

Add your duo configuration to your Nextcloud's nextcloud/config/config.php fils:

'twofactor_duo' => [
'IKEY' => 'xxx',
'SKEY' => 'yyy',
'HOST' => '*.duosecurity.com',
'CALL' => 'https://example.com/login/callback/duo',
],

Nextcloud Lib Patch

nextcloud/lib/public/Authentication/TwoFactorAuth/IProvider.php

nextcloud/lib/private/Authentication/TwoFactorAuth/Manager.php

nextcloud/apps/twofactor_backupcodes/lib/Provider/BackupCodesProvider.php

public function verifyChallenge(IUser $user, string $challenge): bool;

Change to: (remove the word string)

public function verifyChallenge(IUser $user, $challenge): bool;

Nextcloud Core Patch

nextcloud/core/routes.php

['name' => 'TwoFactorChallenge#solveChallenge', 'url' => '/login/challenge/{challengeProviderId}', 'verb' => 'POST'],

After that line, add this:

['name' => 'TwoFactorChallenge#solveChallenge', 'url' => '/login/callback/{challengeProviderId}', 'verb' => 'GET'],

Please come to our website https://tilyanpristka.id/en/