Login form question

I am tasked with porting a client-/server Windows desktop application from Delphi to a web based solution (intranet only).

Users and their passwords are maintained within this application and its DB. There will never a self-signup functionality of users.

Question: Can I somehow (ab)use the built-in user functionality from Anvil or am I better off just designing my own custom login form and starting from there?

The main alternative to Anvil’s automated log-in form is to create one of your own, calling a server-side or Uplink function to validate its inputs (authenticate the purported user).

However, your server-side code, supporting that form, could still leverage some of Anvil’s built-in functionality – if you want it. It is layered.

The bottom layer is a Users table, in your App’s Anvil database, with Anvil’s Users Service.

From your perspective, some columns in this table might be redundant, replicated data. I.e., copied from your existing database to Anvil’s.

Managing that replication is pretty easy. Thanks to Anvil’s Uplink feature, code running in-house can refresh your Users table whenever you want.

But if you route those authentication calls to an in-house Uplink program, it could also just authenticate directly against your existing, in-house Users table (or equivalent). In this case, there would be no need to user Anvil’s Users Service, and no data to replicate.

If I’m understanding correctly, you want an admin to be able to create user accounts in the app? If that’s the case, then you’d use the users service signup_with_email funtion Anvil Docs | anvil.users to create the users, and from then you’d use the normal anvil.users.login_with_form(show_signup_option=False) to allow them to login.

I took this to mean that the existing desktop app already had its own (in-house, corporate) DB:

so the Anvil Users table would probably be redundant.