Phase 10, part 3: signing in and out, resets, locks and two-factor
The server edition now starts. Sign-in by email and password, limited per address and per IP; ten failures in a row lock the account and email its owner, and a reset by email (or an admin) unlocks it. Settings → Your account has the profile, the password, where you're signed in, and two-factor sign-in with an authenticator app (TOTP, from a QR code) and ten recovery codes. The app's own mail goes through SUPERMARKET_MAIL_URL. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -15,6 +15,7 @@ const (
|
||||
SetupLink Purpose = "setup" // creates the first owner
|
||||
ResetLink Purpose = "reset" // chooses a new password
|
||||
InviteLink Purpose = "invite" // joins the team
|
||||
CodeLink Purpose = "code" // a sign-in waiting for its two-factor code
|
||||
)
|
||||
|
||||
// How long each kind of link lasts.
|
||||
@@ -22,6 +23,7 @@ var linkTTL = map[Purpose]time.Duration{
|
||||
SetupLink: 24 * time.Hour,
|
||||
ResetLink: time.Hour,
|
||||
InviteLink: 7 * 24 * time.Hour,
|
||||
CodeLink: 5 * time.Minute,
|
||||
}
|
||||
|
||||
// ErrBadLink is a link that's unknown, used, replaced or out of date.
|
||||
|
||||
Reference in New Issue
Block a user