No description
  • JavaScript 61.3%
  • PHP 29%
  • TypeScript 5.8%
  • Vue 3.3%
  • Shell 0.3%
  • Other 0.3%
Find a file
Christoph Wurst 972f4e628f
Merge pull request #1810 from nextcloud/renovate/master-actions-checkout-7.x
chore(deps): bump actions/checkout action to v7.0.0 (master)
2026-07-17 11:39:42 +02:00
.github Merge pull request #1810 from nextcloud/renovate/master-actions-checkout-7.x 2026-07-17 11:39:42 +02:00
.tx chore(translations): Remove custom backport file to follow the main pattern 2023-05-25 11:55:33 +02:00
appinfo feat: allow admins to configure TOTP algorithm and secret length 2026-06-17 17:33:55 +02:00
build-js fix(reuse): Fix reuse detection in build script 2025-11-25 12:20:48 +01:00
css docs(spdx): Add SPDX header 2024-10-29 11:00:09 +01:00
img docs(spdx): Add SPDX header 2024-10-29 11:00:09 +01:00
js fix(deps): bump @nextcloud/password-confirmation from 6.0.2 to ^6.1.0 (master) (#1704) 2026-07-03 11:40:38 +00:00
l10n fix(l10n): Update translations from Transifex 2026-07-14 02:12:18 +00:00
lib fix(rector): apply Nextcloud 35 rector rules 2026-07-03 13:01:19 +02:00
LICENSES fix(deps): bump @nextcloud/password-confirmation from v5 to v6 2025-11-28 12:56:04 +01:00
screenshots docs(spdx): Add SPDX header 2024-10-29 11:00:09 +01:00
src test(e2e): mark slow tests that wait for TOTP token rotation 2026-06-17 15:52:54 +02:00
templates feat: add better support for browser autocomplete 2025-05-23 13:53:50 +02:00
tests fix(rector): apply Nextcloud 35 rector rules 2026-07-03 13:01:19 +02:00
vendor-bin chore(deps): bump rector/rector from 2.4.2 to ^2.5.4 (#1806) 2026-07-16 10:18:06 +02:00
.eslintrc.js refactor: upgrade to Vue 3 and update test infrastructure 2026-03-26 16:01:12 +00:00
.git-blame-ignore-revs chore: ignore update to coding-standard 1.3.2 in git blames 2024-10-29 09:32:38 +00:00
.gitignore test: introduce e2e tests using playwright 2025-12-05 17:50:09 +01:00
.l10nignore docs(spdx): Add SPDX header 2024-10-29 11:00:09 +01:00
.nextcloudignore chore: add an agents file 2026-06-08 11:04:56 +02:00
.php-cs-fixer.dist.php docs(spdx): Add SPDX header 2024-10-29 11:00:09 +01:00
AGENTS.md chore: add an agents file 2026-06-08 11:04:56 +02:00
AUTHORS.md docs(spdx): Add SPDX header 2024-10-29 11:00:09 +01:00
babel.config.js fix(deps): bump @nextcloud/password-confirmation from v5 to v6 2025-11-28 12:56:04 +01:00
CHANGELOG.md docs(spdx): Add SPDX header 2024-10-29 11:00:09 +01:00
CLAUDE.md chore: add an agents file 2026-06-08 11:04:56 +02:00
composer.json chore(deps): bump psalm/phar from 5.26.1 to v7 2026-07-02 13:44:09 +02:00
composer.lock chore(deps): bump psalm/phar from 5.26.1 to v7 2026-07-02 13:44:09 +02:00
COPYING initial commit 2016-06-04 11:43:53 +02:00
krankerl.toml docs(spdx): Add SPDX header 2024-10-29 11:00:09 +01:00
package-lock.json chore(deps): bump eslint-plugin-chai-friendly from 1.2.0 to ^1.2.1 (#1801) 2026-07-17 11:38:41 +02:00
package.json chore(deps): bump eslint-plugin-chai-friendly from 1.2.0 to ^1.2.1 (#1801) 2026-07-17 11:38:41 +02:00
playwright.config.js test: introduce e2e tests using playwright 2025-12-05 17:50:09 +01:00
psalm.xml ci: bump psalm phpVersion to 8.3 2026-06-17 16:52:12 +02:00
README.md feat: allow admins to configure TOTP algorithm and secret length 2026-06-17 17:33:55 +02:00
rector.php build(rector): add nextcloud/rector and wire NEXTCLOUD_35 set 2026-07-03 13:00:14 +02:00
REUSE.toml chore: add an agents file 2026-06-08 11:04:56 +02:00
stylelint.config.js docs(spdx): Add SPDX header 2024-10-29 11:00:09 +01:00
webpack.config.js docs(spdx): Add SPDX header 2024-10-29 11:00:09 +01:00

Two Factor Totp

REUSE status Downloads Build Status

Sauce Test Status

Tested with the following apps:

Tested with the following hardware devices:

Installation

Nextcloud 25 and newer

The app is shipped and comes with the installation of Nextcloud Server. No additional steps are necessary, besides activating it.

Nextcloud 24 and older

The app is available through the app store. It can be installed through Nextcloud's app management UI.

Enabling TOTP 2FA for your account

Admin configuration

Administrators can harden TOTP settings via occ. Changes only affect newly enrolled secrets; existing enrollments continue to work with the algorithm they were created with.

Hash algorithm

The default algorithm is SHA1 as required by RFC 6238. Stricter environments may prefer SHA256 or SHA512, provided all users' authenticator apps support the chosen algorithm.

Value Algorithm
sha1 SHA1 (default)
sha256 SHA256
sha512 SHA512
occ config:app:set twofactor_totp --type=string algorithm --value=sha256

Secret length

The generated TOTP secret defaults to 32 Base32 characters (160 bits), which meets the recommendation in RFC 4226. Administrators can increase this for higher entropy requirements.

Characters Bits
Minimum 26 130
Default 32 160
Maximum 128 640
occ config:app:set twofactor_totp --type=integer secret_length --value=64

Login with external apps

Once you enable OTP with Two Factor Totp, your applications (for example your Android app or your GNOME app) will need to login using device passwords. To manage it, know more here

Development setup

  • composer i
  • npm ci
  • npm run build or npm run dev more info