Przejdź do treści

SmartAuth 2.0.50: the install prompt no longer comes back, route cache made reliable

Projekt : SmartAuth Wydawca : CAP-REL Wersja : 2.0.50 Data : Dolibarr 18 do 24

Drobna funkcja stabilna ogłoszona 27 dni temu zadeklarowana zgodność w English

The install prompt stops coming back

A SmartMaker application installed on the home screen periodically asked to be installed again. The manifest served by SmartAuth now declares itself as a related application: the browser recognises that it is already there and no longer shows the prompt.

On iPhone and iPad, this is the sole available signal. No browser interface there tells a page that it was launched from the home screen.

Knowing which devices have installed the application

A new call, POST /account/device-install-state, lets the application report that it is running installed rather than in a tab. The information is kept on the user's logical device, visible from the SmartAuth tab of their record.

It never goes back down: opening the same address in a tab after installation does not make it forget that the application is installed. A device that has reported nothing remains distinct from a device using the browser, which avoids counting as "not installed" the devices that are still using an earlier version of the application.

Route cache: no more misleading warning

Modules that expose their own routes have declared them since the previous version. Two defects remained:

  • SmartAuth warned itself that it was not declared, which was false;
  • the warning inviting migration from file scanning to declaration appeared even when no installed module was concerned.

Both are fixed. The warning is now triggered only when a module present can actually be migrated, and the log states the exact cause of a cache rebuild.

Fixes and internal work

  • Dolibarr objects whose class does not declare $fields are once again correctly identified by object mappings.
  • OAuth2 configuration forms are protected against double submission, and the missing labels are translated into the eight languages shipped.
  • The memory cache is flushed last during module installation, so that no intermediate state is put back into cache.
  • The announced baseline is aligned on Dolibarr 18.0 and PHP 7.4, which matches what is actually tested. Backward compatibility with Dolibarr 16, having become useless, has been removed.
  • The distribution archive is now verified: it can no longer ship with an embedded development dependency.
  • All the module's administration and list pages are covered by tests that fail at the slightest fatal error.