When I upgraded to macOS Sierra about a month ago, I was given a notice that my admin password needed to change, so I went ahead and added a new one. After that, I ran into an odd situation during reboot. I would have to “log in” twice: once with my Apple ID and then with my admin password. While this wasn’t a huge deal, it was a bit annoying and a bit confusing a well.
It turned out that during the upgrade process (or maybe before and I never noticed) that my FileVault encryption password had been tied to my Apple ID account. While this is handy as a means of unlocking the computer, it caused the “double login” because the Apple ID was only working to access drive contents, then you had to login as usual.
To fix it: I disabled FileVault and re-enabled it again, but used a GUID generated key that was tied to the keychain. I made sure to print out the key and put it in a safe place. Now there is no “double login” problems, since the OS can use the keychain and unlock itself.
When working with Forms Authentication on an ASP.Net application, its quite convenient that there is a Login web control already available for you. It has all the necessary buttons, and you can easily customize and add text to the login prompts. You can disable the remember password and reset options if you want as well.
The one problem though is that by default, the Username field doesn’t have focus, and pressing the Enter key doesn’t click the “Login” button for you. However, you can get both of these features in two simple lines of code. Assuming the name of your login control is “AppLogin”, simply add the following code to the Page_Load method of your login page:
That’s all you need. The odd naming convention when setting the default button is due to the fact that the control is going to be rendered at runtime, and ASP.Net likes to add some additional text to enforce that all controls are uniquely named. You may need to view your login page for the first time and search for the text “LoginButton” to find out how the control is uniquely named. In my case, I have my login page as a content page within a master template.