You could take a look at https://github.com/flagrow/direct-links which is compatible with the latest Flarum version and does something very similar by opening the login modal, except it does so only on a given page.
Combining the javascript from the older extension and the javascript from direct-links and with the PHP from direct-links, it should be relatively easy to implement the same thing.
The biggest changes since Flarum beta7 (which was probably the last version in which flarum-login-page worked) are the new javascript files structure and webpack configuration, as well as the use of extenders. The extenders for the assets can be seen in the documentation and most current extensions. The code to expose a setting from the database is largely the same and can also be seen in many current extensions.