Files
Amir ZarrinkafshandJames Elliott acdc2d502b feat(totp): make the suggested authenticator app configurable (#13095)
The registration dialog hardcoded the Google Authenticator store
listings in `web/src/constants/constants.ts`, so an operator who
standardises on a different authenticator application had no way to
point users at it and the dialog kept advertising an application they
did not want used.

This adds `totp.apps.apple_store` and `totp.apps.google_play`, each with
a `url` and a `disable` option. Every `url` is optional and defaults to
the Google Authenticator listing for that store, so a deployment which
configures nothing behaves exactly as it did before, and each configured
value must be an absolute `https` URL. The values reach the frontend
through the embedded `data-totpapp*` attributes rather than an API call,
as they are static for the lifetime of the process, which is the same
route already used by `resetpasswordcustomurl`.

A store which sets `disable` sends an empty link to the frontend and its
badge is not rendered, which also means a disabled store's `url` is
neither defaulted nor validated. Disabling every store removes the
prompt above the badges as well, so an operator who does not want to
suggest an application at all can turn the whole section off without the
prompt being left behind pointing at nothing.

The prompt above the badges was `Need Google Authenticator?`, which
would be wrong for any other configured application, so it is now `Need
an authenticator app?`. The store badges themselves are unchanged: they
identify the store rather than the application, so they remain correct
whichever listing the link points at.

This does not add an F-Droid badge. That needs a third store badge
shipped as a trademarked asset with its own `REUSE.toml` annotation,
which is a licensing decision rather than a code one, and the issue
itself raises it as possibly separate.

Closes #1981

---------

Signed-off-by: Amir Zarrinkafsh <3339418+nightah@users.noreply.github.com>
Signed-off-by: James Elliott <james-d-elliott@users.noreply.github.com>
Co-authored-by: James Elliott <james-d-elliott@users.noreply.github.com>
2026-09-20 12:08:44 +00:00
..
2026-09-17 11:45:43 +00:00