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

"NextCloud Core Patch" Steps Seem Incompatible with nextcloud/core/routes.php in NextCloud 30 #1

Open XceptN opened 1 week ago

XceptN commented 1 week ago

I am trying to add twofactor_duo app on a fresh NextCloud 30 installation.

The https://github.com/tilyanPristka/twofactor_duo/blob/main/README.md talks about having

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

in nextcloud/core/routes.php but it does not exists. Also there is no existing array there. My file is as below:

<?php

declare(strict_types=1);

/**
 * SPDX-FileCopyrightText: 2016-2024 Nextcloud GmbH and Nextcloud contributors
 * SPDX-FileCopyrightText: 2012-2016 ownCloud, Inc.
 * SPDX-License-Identifier: AGPL-3.0-only
 */

/** @var $this OCP\Route\IRouter */
// Core ajax actions
// Routing
$this->create('core_ajax_update', '/core/ajax/update.php')
        ->actionInclude('core/ajax/update.php');

$this->create('heartbeat', '/heartbeat')->get();

where should I add line

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

then?

XceptN commented 2 days ago

I have identified that the contents of core/routes.php has drastically changed with NextCloud 29 and later.