Spec

Login

Login and admin login.

Registration switch

Creating an account at /register is controlled by the Registration switch on /admin (the SiteSettings table; it replaced the Registration:Enabled setting). It starts closed. While it's closed, /register says "Registration is not currently enabled at this time." and refuses a posted form, and the "Create an account" links (menu, sign-in page, Hire me page) are hidden. Existing accounts can still sign in.

Changing your password

/account/password (linked from the profile page), for anyone signed in: the current password, then the new one twice (12 characters or more). It signs the browser in again with the new password.

Temporary passwords and making an admin

On the VPS, one command makes an account an admin (creating it if needed) with a temporary password:

docker exec jonathanmccaffrey dotnet JM.Web.dll create-admin you@example.com
  • The password is 20 random characters (no look-alikes), emailed to the account through the site's mail settings. If mail isn't set up or the send fails, the command prints it instead.
  • It works for 48 hours. After that, signing in with it is refused ("ask for a new one"), and a session still open with it is signed out.
  • Until a new password is chosen, every page sends the account to /account/password (the MustChangePassword flag; TemporaryPasswordExpiresUtc holds the expiry). Choosing one clears both.
  • Running it again on the same account gives it a new temporary password: the way to reset a forgotten one.
  • Code: Auth/TemporaryPasswords.cs, the create-admin block in Program.cs. The card game hosting site has the same.