What is the current recommended starting point for new user registration?

To compound what @knoobie said, the login form is pretty simple - it has two fields for filling in your username and password, and a button to submit (and a few other things like an error message, a title text, etc.). Note that this is not enough for every login scenario, but that’s a slightly separate discussion. This simple setup works very nicely because Spring Security - an industry-standard security framework - has a feature for form-based authentication, which you can use here, but it does require some extra attention on the login form’s side to be compatible. More specifically, Spring Security requires a HTML <form> submission with a matching action for form-based login to work, and that can be non-trivial for newbies to implement. Furthermore, plain username + password-based authentication happens to work with very many (but not all) backends, probably because of legacy reasons.

User registration, however, is a whole different kettle of fish. A bare-bones registration form that requires you to input only a username and a password is not going to be enough in a vast majority of cases. Is there a separate username and email? Date of birth? Profile picture? First name and last name? Department? Title? Phone number? Direct supervisor? Authentication id? Dietary restrictions? Emergency contact information? Are some of those mandatory and others optional? The answer to all of those questions is “it depends on the backend and the business requirements of your application”. Creating a custom Vaadin form for any permutation of different user properties is going to be a fairly simple task, but it’s probably going to be a little different every time. I don’t know if it would make sense to provide a Component for that, especially because there aren’t any requirements from e.g. Spring Security to provide compliant behavior.

As for Snaplets, they have since been renamed to AppJars, developed and maintained by Flowing Code, and you can find some information about them here: https://www.appjars.com/.

You might also be interested in taking a look at what Vaadin is building with the Control Center: https://vaadin.com/forum/t/vaadin-control-center/

1 Like