Blogger :
Scott on Writing
All posts :
All posts by Scott on Writing
Category :
ASP.NET
Blogged date : 2008 Jul 25
In my last blog entry, The CreateUserWizard and Validation ErrorMessages, reader Andrei Rinea commented:
I wish the whole Membership set of controls would be replaced with better ones. Very often I need to have an authentication/authorization mechanism that doesn't need a username but an e-mail. I need email verification and in case the user loses the password he/she should be able to recover it without knowing (a) username.
This scenario is possible, but requires some customizations of the Membership controls. For instance, you can configure Membership so that an Email is not required, and then customize the CreateUserWizard control so that it uses the text “E-mail:” in place of “Username:” (thereby storing the user's e-mail address as their username.
The CreateUserWizard control can also be customized to require that user's verify their email address before being able to log in. See these two articles for more information and to download a complete, working example:
Personally, I quite like the existing Membership controls. They provide a suitable out-of-the-box implementation that allows one to get started without having to write a lick of code, yet are highly customizable through properties, templates, and events, allowing for virtually unlimited scearios and workflows. And if a particular control doesn't cut the mustard you can always create your own UI that uses the Membership framework behind the scenes (via the Membership class).