diff --git a/CHANGELOG.md b/CHANGELOG.md
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -4,6 +4,14 @@
 [PVP](https://pvp.haskell.org/) and is versioned independently of the other
 Shōmei packages.
 
+## 0.4.0.0 — 2026-11-25
+
+- `Shomei.Session.Domain` exports `sessionKindToText`/`sessionKindFromText` (the one spelling shared by persistence and introspection) and `sessionInvolves`. **Behavior:** `RevokeAllUserSessions` implementations must also revoke sessions in which the user is the delegated actor, and `RevokeServiceAccount` must revoke the account's live machine and delegated sessions; the in-memory interpreters do.
+
+- **Breaking:** add audited administrator second-factor recovery, authentication generations on users/pending state, guarded persistence ports and typed stale-proof rejection. Session issuance returns an explicit Either; enrollment APIs bind an optional trusted source session. Add secret-free recovery notifications and the reset audit event.
+
+- Export `knownAuthEventTypes` from the audit codec for version-specific event vocabulary validation.
+
 ## 0.3.0.1 — 2026-11-17
 
 - Admit `base64` 2.0 and 2.1 (`>=1.0 && <2.2`), so consumers whose `tls` stack resolves base64 2.0 through `crypton-pem` need no `allow-newer`. No source or API change: the passkey codec uses only `encodeBase64Unpadded`, `decodeBase64UnpaddedUntyped` and `extractBase64`, whose behavior is unchanged in base64 2.x.
diff --git a/shomei-core.cabal b/shomei-core.cabal
--- a/shomei-core.cabal
+++ b/shomei-core.cabal
@@ -1,6 +1,6 @@
 cabal-version: 3.0
 name: shomei-core
-version: 0.3.0.1
+version: 0.4.0.0
 synopsis:
   Transport-agnostic domain: types, commands, events, errors, and effects
 
@@ -58,6 +58,8 @@
   import: warnings, shared
   hs-source-dirs: src
   exposed-modules:
+    Shomei.Account.Admin.Recovery
+    Shomei.Account.Admin.Recovery.Domain
     Shomei.Account.Admin.Workflow
     Shomei.Account.Credential.Domain
     Shomei.Account.Credential.Store
@@ -117,6 +119,7 @@
     Shomei.ServiceAccount.Domain
     Shomei.ServiceAccount.Secret
     Shomei.ServiceAccount.Store
+    Shomei.Session.Authentication.Guard
     Shomei.Session.Authentication.Workflow
     Shomei.Session.Command
     Shomei.Session.Domain
@@ -206,7 +209,7 @@
     effectful >=2.5 && <2.8,
     effectful-core >=2.5 && <2.8,
     generic-lens >=2.2 && <2.4,
-    shomei-core ^>=0.3.0.0,
+    shomei-core ^>=0.4.0.0,
     tasty >=1.4 && <1.6,
     tasty-hunit >=0.10 && <0.11,
     text >=2.0 && <2.2,
diff --git a/src/Shomei/Account/Admin/Recovery.hs b/src/Shomei/Account/Admin/Recovery.hs
new file mode 100644
--- /dev/null
+++ b/src/Shomei/Account/Admin/Recovery.hs
@@ -0,0 +1,25 @@
+-- | Shared validated recovery. Calling surfaces enforce authority before invoking it.
+module Shomei.Account.Admin.Recovery (module Shomei.Account.Admin.Recovery.Domain, resetUserSecondFactors) where
+
+import Effectful (Eff, (:>))
+import Shomei.Account.Admin.Recovery.Domain
+import Shomei.Account.Notification.Domain (Notification (SecondFactorsReset))
+import Shomei.Account.Notification.Store (Notifier, sendNotification)
+import Shomei.Error (AuthError)
+import Shomei.Id (UserId)
+import Shomei.Prelude
+import Shomei.Session.UnitOfWork.Store (AuthUnitOfWork, resetSecondFactors)
+import Shomei.Time.Store (Clock, now)
+
+resetUserSecondFactors :: (AuthUnitOfWork :> es, Clock :> es, Notifier :> es) => RecoveryActor -> UserId -> RecoveryCommand -> Eff es (Either AuthError RecoveryResult)
+resetUserSecondFactors actor uid command = case validateRecovery actor command of
+  Left err -> pure (Left err)
+  Right () -> do
+    ts <- now
+    result <- resetSecondFactors actor uid command ts
+    case result of
+      Left err -> pure (Left err)
+      Right (committed, destination) -> do
+        -- The destination was captured under the same user lock as the committed reset.
+        forM_ destination \address -> sendNotification (SecondFactorsReset address ts "Your second factors were reset by an administrator. Sign in with your password and immediately enroll replacement factors and new recovery codes. If you did not request this, contact your established support channel immediately.")
+        pure (Right committed)
diff --git a/src/Shomei/Account/Admin/Recovery/Domain.hs b/src/Shomei/Account/Admin/Recovery/Domain.hs
new file mode 100644
--- /dev/null
+++ b/src/Shomei/Account/Admin/Recovery/Domain.hs
@@ -0,0 +1,52 @@
+-- | Secret-free administrative recovery commands, attribution, and committed effects.
+module Shomei.Account.Admin.Recovery.Domain (RecoveryActor (..), RecoveryCommand (..), RecoveryCounts (..), RecoveryResult (..), validateRecovery, recoveryActorUser) where
+
+import Data.Char (isAlphaNum, isAscii)
+import Data.Text qualified as Text
+import Shomei.Error (AuthError (InvalidInput))
+import Shomei.Id (UserId)
+import Shomei.Prelude
+
+-- | Local labels are asserted attribution. Service principals are not human operators.
+data RecoveryActor = AuthenticatedAdministrator UserId | AdministratorService UserId | LocalOperator Text
+  deriving stock (Generic, Eq, Show)
+  deriving anyclass (FromJSON, ToJSON)
+
+data RecoveryCommand = RecoveryCommand {identityVerified :: !Bool, caseReference :: !Text}
+  deriving stock (Generic, Eq, Show)
+  deriving anyclass (FromJSON, ToJSON)
+
+data RecoveryCounts = RecoveryCounts
+  { passkeysRemoved :: !Int,
+    totpCredentialsRemoved :: !Int,
+    recoveryCodesRemoved :: !Int,
+    ceremoniesRemoved :: !Int,
+    sessionsRevoked :: !Int,
+    refreshTokensRevoked :: !Int,
+    authorizationCodesInvalidated :: !Int,
+    passwordResetTokensRevoked :: !Int
+  }
+  deriving stock (Generic, Eq, Show)
+  deriving anyclass (FromJSON, ToJSON)
+
+data RecoveryResult = RecoveryResult
+  { resetAt :: !UTCTime,
+    counts :: !RecoveryCounts,
+    verifiedNotificationDestination :: !Bool
+  }
+  deriving stock (Generic, Eq, Show)
+  deriving anyclass (FromJSON, ToJSON)
+
+validateRecovery :: RecoveryActor -> RecoveryCommand -> Either AuthError ()
+validateRecovery actor cmd
+  | not cmd.identityVerified || not (boundedLabel cmd.caseReference) = Left InvalidInput
+  | LocalOperator label <- actor, not (boundedLabel label) = Left InvalidInput
+  | otherwise = Right ()
+  where
+    boundedLabel s = not (Text.null s) && Text.length s <= 128 && Text.all (\c -> isAscii c && (isAlphaNum c || c `elem` ("._:/-" :: String))) s
+
+recoveryActorUser :: RecoveryActor -> Maybe UserId
+recoveryActorUser = \case
+  AuthenticatedAdministrator uid -> Just uid
+  AdministratorService uid -> Just uid
+  LocalOperator _ -> Nothing
diff --git a/src/Shomei/Account/Notification/Domain.hs b/src/Shomei/Account/Notification/Domain.hs
--- a/src/Shomei/Account/Notification/Domain.hs
+++ b/src/Shomei/Account/Notification/Domain.hs
@@ -19,5 +19,10 @@
         token :: !OneTimeToken,
         expiresAt :: !UTCTime
       }
+  | SecondFactorsReset
+      { email :: !Email,
+        occurredAt :: !UTCTime,
+        supportInstructions :: !Text
+      }
   deriving stock (Generic, Eq, Show)
   deriving anyclass (FromJSON, ToJSON)
diff --git a/src/Shomei/Account/User/Domain.hs b/src/Shomei/Account/User/Domain.hs
--- a/src/Shomei/Account/User/Domain.hs
+++ b/src/Shomei/Account/User/Domain.hs
@@ -7,7 +7,8 @@
   )
 where
 
-import Data.Aeson (withObject, (.:), (.:?))
+import Data.Aeson (withObject, (.!=), (.:), (.:?))
+import Data.Int (Int64)
 import Data.Text qualified as Text
 import Shomei.Account.Email.Domain (Email, emailText, mkEmail, parseStoredEmail)
 import Shomei.Account.LoginId.Domain (LoginId, loginIdText, mkLoginId, parseLoginIdForAuthentication)
@@ -27,7 +28,8 @@
     status :: !UserStatus,
     emailVerifiedAt :: !(Maybe UTCTime),
     createdAt :: !UTCTime,
-    updatedAt :: !UTCTime
+    updatedAt :: !UTCTime,
+    authenticationGeneration :: !Int64
   }
   deriving stock (Generic, Eq, Show)
   deriving anyclass (ToJSON)
@@ -46,6 +48,7 @@
       <*> o .:? "emailVerifiedAt"
       <*> o .: "createdAt"
       <*> o .: "updatedAt"
+      <*> (o .:? "authenticationGeneration" .!= 0)
 
 data NewUser = NewUser
   { loginId :: !LoginId,
diff --git a/src/Shomei/Audit/Event/Codec.hs b/src/Shomei/Audit/Event/Codec.hs
--- a/src/Shomei/Audit/Event/Codec.hs
+++ b/src/Shomei/Audit/Event/Codec.hs
@@ -15,6 +15,7 @@
 module Shomei.Audit.Event.Codec
   ( reconstructAuthEvent,
     projectAuthEvent,
+    knownAuthEventTypes,
   )
 where
 
@@ -26,6 +27,54 @@
 import Shomei.Id (sessionIdToUUID, userIdToUUID)
 import Shomei.Prelude
 
+-- | Stored event names supported by this binary. Keep in sync with the codec fixtures.
+knownAuthEventTypes :: [Text]
+knownAuthEventTypes =
+  [ "user_registered",
+    "login_succeeded",
+    "login_failed",
+    "session_started",
+    "session_revoked",
+    "refresh_token_rotated",
+    "refresh_token_reuse_detected",
+    "email_verification_requested",
+    "email_verified",
+    "password_reset_requested",
+    "password_reset_completed",
+    "password_changed",
+    "password_change_failed",
+    "user_suspended",
+    "user_deleted",
+    "user_reinstated",
+    "user_second_factors_reset",
+    "account_locked",
+    "login_throttled",
+    "passkey_registered",
+    "passkey_removed",
+    "mfa_challenged",
+    "mfa_succeeded",
+    "mfa_failed",
+    "totp_enrolled",
+    "totp_removed",
+    "recovery_codes_generated",
+    "recovery_code_used",
+    "impersonation_started",
+    "impersonation_stopped",
+    "impersonation_action_blocked",
+    "service_on_behalf_issued",
+    "service_token_issued",
+    "role_granted",
+    "role_revoked",
+    "service_account_created",
+    "service_account_secret_rotated",
+    "service_account_revoked",
+    "oauth_client_created",
+    "oauth_client_revoked",
+    "oauth_code_issued",
+    "oauth_code_replayed",
+    "notification_delivery_failed"
+  ]
+
 -- | Reconstruct a typed event. The @event_type@ strings are the exact ones the writer
 -- emits (see 'Shomei.Audit.Publisher.Postgres.projectAuthEvent'); keep the two in lockstep.
 -- A 'Left' means either an unknown @event_type@ or a payload that does not decode into the
@@ -47,6 +96,7 @@
   "password_change_failed" -> PasswordChangeFailed <$> parse payload
   "user_suspended" -> UserSuspended <$> parse payload
   "user_deleted" -> UserDeleted <$> parse payload
+  "user_second_factors_reset" -> UserSecondFactorsReset <$> parse payload
   "user_reinstated" -> UserReinstated <$> parse payload
   "account_locked" -> AccountLocked <$> parse payload
   "login_throttled" -> LoginThrottled <$> parse payload
@@ -124,6 +174,8 @@
     (Just (userIdToUUID d.userId), Nothing, "user_suspended", toJSON d, d.occurredAt)
   UserDeleted d ->
     (Just (userIdToUUID d.userId), Nothing, "user_deleted", toJSON d, d.occurredAt)
+  UserSecondFactorsReset d ->
+    (Just (userIdToUUID d.userId), Nothing, "user_second_factors_reset", toJSON d, d.occurredAt)
   UserReinstated d ->
     (Just (userIdToUUID d.userId), Nothing, "user_reinstated", toJSON d, d.occurredAt)
   AccountLocked d@(AccountLockedData _ _ _ _ occ) ->
diff --git a/src/Shomei/Audit/Event/Domain.hs b/src/Shomei/Audit/Event/Domain.hs
--- a/src/Shomei/Audit/Event/Domain.hs
+++ b/src/Shomei/Audit/Event/Domain.hs
@@ -26,6 +26,7 @@
     UserSuspendedData (..),
     UserDeletedData (..),
     UserReinstatedData (..),
+    UserSecondFactorsResetData (..),
     AccountLockedData (..),
     LoginThrottledData (..),
     PasskeyRegisteredData (..),
@@ -58,6 +59,7 @@
 import Data.Aeson (withObject, (.:), (.:?))
 import Data.Set (Set)
 import Data.UUID qualified as UUID
+import Shomei.Account.Admin.Recovery.Domain (RecoveryActor, RecoveryCounts)
 import Shomei.Account.Email.Domain (Email, parseStoredEmail)
 import Shomei.Account.LoginId.Domain (LoginId, parseLoginIdForAuthentication)
 import Shomei.Authorization.Claims.Domain (Role, Scope)
@@ -507,6 +509,16 @@
   deriving stock (Generic, Eq, Show)
   deriving anyclass (FromJSON, ToJSON)
 
+data UserSecondFactorsResetData = UserSecondFactorsResetData
+  { userId :: !UserId,
+    recoveryActor :: !RecoveryActor,
+    caseReference :: !Text,
+    counts :: !RecoveryCounts,
+    occurredAt :: !UTCTime
+  }
+  deriving stock (Generic, Eq, Show)
+  deriving anyclass (FromJSON, ToJSON)
+
 data AuthEvent
   = UserRegistered UserRegisteredData
   | LoginSucceeded LoginSucceededData
@@ -524,6 +536,7 @@
   | UserSuspended UserSuspendedData
   | UserDeleted UserDeletedData
   | UserReinstated UserReinstatedData
+  | UserSecondFactorsReset UserSecondFactorsResetData
   | AccountLocked AccountLockedData
   | LoginThrottled LoginThrottledData
   | PasskeyRegistered PasskeyRegisteredData
diff --git a/src/Shomei/Delegation/Workflow.hs b/src/Shomei/Delegation/Workflow.hs
--- a/src/Shomei/Delegation/Workflow.hs
+++ b/src/Shomei/Delegation/Workflow.hs
@@ -132,8 +132,8 @@
 -- 'subjectUserId', @act@ = 'actorUserId') plus 'scopes'. No refresh token, no @LoginSucceeded@\/
 -- @SessionStarted@ events — the delegated session cannot be silently renewed and dies at its TTL.
 --
--- This is the single mint both delegation flows share, so the standards-based token-exchange grant
--- and the bespoke @\/auth\/impersonate@ endpoint cannot drift in session shape or claim contents.
+-- This is the single mint both modes of the @POST \/oauth\/token@ token-exchange grant share,
+-- so impersonation and service on-behalf-of cannot drift in session shape or claim contents.
 -- The audit event is the caller's responsibility, because impersonation and on-behalf-of publish
 -- different events.
 mintDelegatedToken ::
diff --git a/src/Shomei/Error.hs b/src/Shomei/Error.hs
--- a/src/Shomei/Error.hs
+++ b/src/Shomei/Error.hs
@@ -64,6 +64,7 @@
     LoginIdAlreadyRegistered
   | InvalidCredentials
   | UserNotActive
+  | StaleAuthentication
   | SessionNotFound
   | SessionExpired
   | SessionRevoked
diff --git a/src/Shomei/Mfa/RecoveryCode/Store.hs b/src/Shomei/Mfa/RecoveryCode/Store.hs
--- a/src/Shomei/Mfa/RecoveryCode/Store.hs
+++ b/src/Shomei/Mfa/RecoveryCode/Store.hs
@@ -19,21 +19,23 @@
 
 import Effectful (Dispatch (Dynamic), DispatchOf, Eff, Effect, (:>))
 import Effectful.Dispatch.Dynamic (send)
+import Shomei.Error (AuthError)
 import Shomei.Id (UserId)
 import Shomei.Mfa.Totp.Domain (NewRecoveryCode)
 import Shomei.Prelude
+import Shomei.Session.Authentication.Guard (AuthenticationGuard)
 
 data RecoveryCodeStore :: Effect where
   -- | Atomically replace the user's whole recovery-code set (delete existing, insert new).
-  ReplaceRecoveryCodes :: UserId -> [NewRecoveryCode] -> RecoveryCodeStore m ()
+  ReplaceRecoveryCodes :: UserId -> AuthenticationGuard -> UTCTime -> [NewRecoveryCode] -> RecoveryCodeStore m (Either AuthError ())
   -- | Compare-and-set: spend an unused code whose hash matches. 'True' iff a row was consumed.
   ConsumeRecoveryCode :: UserId -> Text -> UTCTime -> RecoveryCodeStore m Bool
   CountUnusedRecoveryCodes :: UserId -> RecoveryCodeStore m Int
 
 type instance DispatchOf RecoveryCodeStore = Dynamic
 
-replaceRecoveryCodes :: (RecoveryCodeStore :> es) => UserId -> [NewRecoveryCode] -> Eff es ()
-replaceRecoveryCodes u cs = send (ReplaceRecoveryCodes u cs)
+replaceRecoveryCodes :: (RecoveryCodeStore :> es) => UserId -> AuthenticationGuard -> UTCTime -> [NewRecoveryCode] -> Eff es (Either AuthError ())
+replaceRecoveryCodes u proofState ts cs = send (ReplaceRecoveryCodes u proofState ts cs)
 
 consumeRecoveryCode :: (RecoveryCodeStore :> es) => UserId -> Text -> UTCTime -> Eff es Bool
 consumeRecoveryCode u h t = send (ConsumeRecoveryCode u h t)
diff --git a/src/Shomei/Mfa/Totp/Domain.hs b/src/Shomei/Mfa/Totp/Domain.hs
--- a/src/Shomei/Mfa/Totp/Domain.hs
+++ b/src/Shomei/Mfa/Totp/Domain.hs
@@ -34,7 +34,8 @@
 -- been activated with a first valid code; @lastUsedCounter@ is the replay-defense high-water
 -- mark (RFC 6238 §5.2), 'Nothing' until the first acceptance.
 data TotpCredential = TotpCredential
-  { totpCredentialId :: !TotpCredentialId,
+  { authenticationGeneration :: !(Maybe Int64),
+    totpCredentialId :: !TotpCredentialId,
     userId :: !UserId,
     secret :: !TotpSecret,
     lastUsedCounter :: !(Maybe Int64),
diff --git a/src/Shomei/Mfa/Totp/Store.hs b/src/Shomei/Mfa/Totp/Store.hs
--- a/src/Shomei/Mfa/Totp/Store.hs
+++ b/src/Shomei/Mfa/Totp/Store.hs
@@ -16,40 +16,47 @@
     confirmTotp,
     setTotpLastUsedCounter,
     deleteTotpByUser,
+    removeTotpCredential,
   )
 where
 
 import Data.Int (Int64)
 import Effectful (Dispatch (Dynamic), DispatchOf, Eff, Effect, (:>))
 import Effectful.Dispatch.Dynamic (send)
+import Shomei.Error (AuthError)
 import Shomei.Id (TotpCredentialId, UserId)
 import Shomei.Mfa.Totp.Domain (NewTotpCredential, TotpCredential)
 import Shomei.Prelude
+import Shomei.Session.Authentication.Guard (AuthenticationGuard)
 
 data TotpCredentialStore :: Effect where
   -- | Insert the enrollment, replacing any existing (unconfirmed) row for the user.
-  UpsertTotpEnrollment :: NewTotpCredential -> TotpCredentialStore m TotpCredential
+  UpsertTotpEnrollment :: AuthenticationGuard -> NewTotpCredential -> TotpCredentialStore m (Either AuthError TotpCredential)
   FindTotpByUser :: UserId -> TotpCredentialStore m (Maybe TotpCredential)
   -- | Mark the credential confirmed (activated) at the given time.
-  ConfirmTotp :: TotpCredentialId -> UTCTime -> TotpCredentialStore m ()
+  ConfirmTotp :: UserId -> AuthenticationGuard -> TotpCredentialId -> UTCTime -> TotpCredentialStore m (Either AuthError ())
   -- | Advance the replay-defense high-water counter only when the supplied value is newer.
   -- 'False' means another request already accepted this counter (or a later one).
   SetTotpLastUsedCounter :: TotpCredentialId -> Int64 -> TotpCredentialStore m Bool
+  RemoveTotpCredential :: UserId -> AuthenticationGuard -> TotpCredentialId -> UTCTime -> TotpCredentialStore m (Either AuthError ())
   DeleteTotpByUser :: UserId -> TotpCredentialStore m ()
 
 type instance DispatchOf TotpCredentialStore = Dynamic
 
-upsertTotpEnrollment :: (TotpCredentialStore :> es) => NewTotpCredential -> Eff es TotpCredential
-upsertTotpEnrollment = send . UpsertTotpEnrollment
+upsertTotpEnrollment :: (TotpCredentialStore :> es) => AuthenticationGuard -> NewTotpCredential -> Eff es (Either AuthError TotpCredential)
+upsertTotpEnrollment proofState = send . UpsertTotpEnrollment proofState
 
 findTotpByUser :: (TotpCredentialStore :> es) => UserId -> Eff es (Maybe TotpCredential)
 findTotpByUser = send . FindTotpByUser
 
-confirmTotp :: (TotpCredentialStore :> es) => TotpCredentialId -> UTCTime -> Eff es ()
-confirmTotp i t = send (ConfirmTotp i t)
+confirmTotp :: (TotpCredentialStore :> es) => UserId -> AuthenticationGuard -> TotpCredentialId -> UTCTime -> Eff es (Either AuthError ())
+confirmTotp uid proofState i t = send (ConfirmTotp uid proofState i t)
 
 setTotpLastUsedCounter :: (TotpCredentialStore :> es) => TotpCredentialId -> Int64 -> Eff es Bool
 setTotpLastUsedCounter i c = send (SetTotpLastUsedCounter i c)
 
 deleteTotpByUser :: (TotpCredentialStore :> es) => UserId -> Eff es ()
 deleteTotpByUser = send . DeleteTotpByUser
+
+removeTotpCredential :: (TotpCredentialStore :> es) => UserId -> AuthenticationGuard -> TotpCredentialId -> UTCTime -> Eff es (Either AuthError ())
+removeTotpCredential uid proofState tcid ts = send (RemoveTotpCredential uid proofState tcid ts)
diff --git a/src/Shomei/Mfa/Totp/Workflow.hs b/src/Shomei/Mfa/Totp/Workflow.hs
--- a/src/Shomei/Mfa/Totp/Workflow.hs
+++ b/src/Shomei/Mfa/Totp/Workflow.hs
@@ -34,7 +34,7 @@
 import Shomei.Authorization.Claims.Domain (Issuer (..))
 import Shomei.Config (ShomeiConfig (..), TotpConfig (..))
 import Shomei.Error (AuthError (..))
-import Shomei.Id (TotpCredentialId, genRecoveryCodeId, genTotpCredentialId)
+import Shomei.Id (SessionId, TotpCredentialId, genRecoveryCodeId, genTotpCredentialId)
 import Shomei.Mfa.RecoveryCode.Store (RecoveryCodeStore, consumeRecoveryCode, replaceRecoveryCodes)
 import Shomei.Mfa.Totp.Algorithm (TotpSecret (..), secretToBase32, verifyTotp)
 import Shomei.Mfa.Totp.Algorithm qualified as Totp
@@ -42,13 +42,14 @@
 import Shomei.Mfa.Totp.Store
   ( TotpCredentialStore,
     confirmTotp,
-    deleteTotpByUser,
     findTotpByUser,
+    removeTotpCredential,
     setTotpLastUsedCounter,
     upsertTotpEnrollment,
   )
 import Shomei.Prelude
 import Shomei.ServiceAccount.Secret (sha256Hex)
+import Shomei.Session.Authentication.Guard (AuthenticationGuard (..), userGuard)
 import Shomei.Session.Command (ProofContext, proofContextFor)
 import Shomei.Session.LoginAttempt.Domain (AttemptFactor (..))
 import Shomei.Session.LoginAttempt.Store (LoginAttemptStore)
@@ -90,8 +91,9 @@
   (TotpCredentialStore :> es, TokenGen :> es, Clock :> es, IOE :> es) =>
   ShomeiConfig ->
   User ->
+  Maybe SessionId ->
   Eff es (Either AuthError TotpEnrollment)
-enrollTotp cfg user = runErrorNoCallStack do
+enrollTotp cfg user sourceSession = runErrorNoCallStack do
   unless (totpEnabled (totpConfig cfg)) (throwError TotpDisabled)
   ts <- now
   let User {userId = uid} = user
@@ -100,7 +102,7 @@
   secretBytes <- generateRandomBytes 20
   let secret = TotpSecret secretBytes
   tcid <- genTotpCredentialId
-  _ <- upsertTotpEnrollment NewTotpCredential {totpCredentialId = tcid, userId = uid, secret, createdAt = ts}
+  _ <- either throwError pure =<< upsertTotpEnrollment ((userGuard user) {initiatingSession = sourceSession}) NewTotpCredential {totpCredentialId = tcid, userId = uid, secret, createdAt = ts}
   pure
     TotpEnrollment
       { secretBase32 = secretToBase32 secret,
@@ -115,9 +117,10 @@
   (TotpCredentialStore :> es, AuthEventPublisher :> es, Clock :> es) =>
   ShomeiConfig ->
   User ->
+  Maybe SessionId ->
   Text ->
   Eff es (Either AuthError ())
-verifyTotpEnrollment cfg user code = runErrorNoCallStack do
+verifyTotpEnrollment cfg user sourceSession code = runErrorNoCallStack do
   unless (totpEnabled (totpConfig cfg)) (throwError TotpDisabled)
   ts <- now
   let User {userId = uid} = user
@@ -125,9 +128,11 @@
   cred <- case existing of
     Just c | not (confirmed c), not (enrollmentExpired cfg ts c) -> pure c
     _ -> throwError TotpEnrollmentNotFound
+  let TotpCredential {authenticationGeneration} = cred
+  when (authenticationGeneration /= Just user.authenticationGeneration) (throwError StaleAuthentication)
   case verifyTotp (secretOf cred) Nothing ts code of
     Just accepted -> do
-      confirmTotp (tcId cred) ts
+      either throwError pure =<< confirmTotp uid ((userGuard user) {initiatingSession = sourceSession}) (tcId cred) ts
       won <- setTotpLastUsedCounter (tcId cred) accepted
       unless won do
         publishAuthEvent (Event.MfaFailed (Event.MfaFailedData (Just uid) "totp_replayed" ts))
@@ -150,9 +155,10 @@
   ShomeiConfig ->
   ProofContext ->
   User ->
+  Maybe SessionId ->
   TotpRemovalProof ->
   Eff es (Either AuthError ())
-removeTotp cfg pctx user proof = runErrorNoCallStack do
+removeTotp cfg pctx user sourceSession proof = runErrorNoCallStack do
   ts <- now
   let User {userId = uid} = user
       ctx = proofContextFor pctx (loginIdText user.loginId)
@@ -189,7 +195,7 @@
           publishAuthEvent (Event.MfaFailed (Event.MfaFailedData (Just uid) "recovery_invalid" ts))
           throwError RecoveryCodeInvalid
   recordProofSuccess ctx factor gate.standingLockout ts
-  deleteTotpByUser uid
+  either throwError pure =<< removeTotpCredential uid ((userGuard user) {initiatingSession = sourceSession}) (tcId cred) ts
   publishAuthEvent (Event.TotpRemoved (Event.TotpRemovedData uid ts))
 
 -- | Generate a fresh set of 'recoveryCodeSetSize' single-use codes, replacing any previous set,
@@ -199,8 +205,9 @@
   (RecoveryCodeStore :> es, TokenGen :> es, AuthEventPublisher :> es, Clock :> es, IOE :> es) =>
   ShomeiConfig ->
   User ->
+  Maybe SessionId ->
   Eff es (Either AuthError [Text])
-regenerateRecoveryCodes _cfg user = runErrorNoCallStack do
+regenerateRecoveryCodes _cfg user sourceSession = runErrorNoCallStack do
   ts <- now
   let User {userId = uid} = user
   codes <- forM [1 .. recoveryCodeSetSize] \_ -> formatRecoveryCode <$> generateRandomBytes 10
@@ -210,7 +217,7 @@
           (\rid code -> NewRecoveryCode {recoveryCodeId = rid, codeHash = recoveryCodeHash code, createdAt = ts})
           ids
           codes
-  replaceRecoveryCodes uid rows
+  either throwError pure =<< replaceRecoveryCodes uid ((userGuard user) {initiatingSession = sourceSession}) ts rows
   publishAuthEvent (Event.RecoveryCodesGenerated (Event.RecoveryCodesGeneratedData uid recoveryCodeSetSize ts))
   pure codes
 
diff --git a/src/Shomei/Mfa/Workflow.hs b/src/Shomei/Mfa/Workflow.hs
--- a/src/Shomei/Mfa/Workflow.hs
+++ b/src/Shomei/Mfa/Workflow.hs
@@ -70,6 +70,7 @@
     updatePasskeySignCounter,
   )
 import Shomei.Prelude
+import Shomei.Session.Authentication.Guard (AuthenticationGuard (..), userGuard)
 import Shomei.Session.Command (ProofContext, proofContextFor)
 import Shomei.Session.LoginAttempt.Domain (AttemptFactor (..))
 import Shomei.Session.LoginAttempt.Store (LoginAttemptStore)
@@ -77,7 +78,7 @@
 import Shomei.Session.Token.Domain (TokenPair)
 import Shomei.Session.Token.Generator (TokenGen)
 import Shomei.Session.UnitOfWork.Store (AuthUnitOfWork)
-import Shomei.Session.Workflow (ensureEmailVerified, issueSession)
+import Shomei.Session.Workflow (SessionOptions (..), defaultSessionOptions, ensureEmailVerified, issueSessionWith)
 import Shomei.SigningKey.Signer (TokenSigner)
 import Shomei.Time.Store (Clock, now)
 
@@ -111,8 +112,8 @@
   ShomeiConfig ->
   User ->
   UTCTime ->
-  Eff es (CeremonyId, Value, [Text])
-prepareMfaChallenge cfg user ts = do
+  Eff es (Either AuthError (CeremonyId, Value, [Text]))
+prepareMfaChallenge cfg user ts = runErrorNoCallStack do
   let User {userId = uid} = user
   creds <- findPasskeysByUser uid
   mTotp <- findTotpByUser uid
@@ -135,15 +136,18 @@
         pure (optionsJson, optionsBlob)
       else pure (object [], BS.empty)
   cid <- genCeremonyId
-  putPendingCeremony
-    PendingCeremony
-      { ceremonyId = cid,
-        userId = Just uid,
-        kind = AuthenticationCeremony,
-        optionsBlob = optionsBlob,
-        createdAt = ts,
-        expiresAt = addUTCTime (pendingCeremonyTTL (webauthnConfig cfg)) ts
-      }
+  either throwError pure
+    =<< putPendingCeremony
+      PendingCeremony
+        { authenticationGeneration = Just user.authenticationGeneration,
+          initiatingSession = Nothing,
+          ceremonyId = cid,
+          userId = Just uid,
+          kind = AuthenticationCeremony,
+          optionsBlob = optionsBlob,
+          createdAt = ts,
+          expiresAt = addUTCTime (pendingCeremonyTTL (webauthnConfig cfg)) ts
+        }
   publishAuthEvent (Event.MfaChallenged (Event.MfaChallengedData uid cid ts))
   pure (cid, optionsJson, methods)
 
@@ -205,11 +209,13 @@
   Eff es (Either AuthError (User, TokenPair))
 completeMfaWith cfg pctx remember ceremonyId completion = runErrorNoCallStack do
   ts <- now
-  PendingCeremony {kind, userId = mUid, optionsBlob} <-
+  PendingCeremony {kind, userId = mUid, optionsBlob, authenticationGeneration} <-
     maybe (throwError PendingCeremonyNotFound) pure =<< takePendingCeremony ceremonyId ts
   when (kind /= AuthenticationCeremony) (throwError PendingCeremonyNotFound)
   uid <- maybe (throwError PendingCeremonyNotFound) pure mUid
+  generation <- maybe (throwError StaleAuthentication) pure authenticationGeneration
   user <- maybe (throwError InvalidCredentials) pure =<< findUserById uid
+  when (user.authenticationGeneration /= generation) (throwError StaleAuthentication)
   let User {status = userStatus} = user
   when (userStatus /= UserActive) (throwError UserNotActive)
   -- 'login' already gates before handing out a ceremony id, so this rarely fires; it keeps
@@ -237,8 +243,8 @@
       unless won (failMfa failure (Just uid) "signature counter replayed")
     MfaTotp code -> completeTotp failure uid ts code
     MfaRecoveryCode code -> completeRecovery failure uid ts code
+  (sid, pair, _) <- either throwError pure =<< issueSessionWith cfg defaultSessionOptions {remember, authenticationGuard = Just (userGuard user)} user ts
   recordProofSuccess ctx factor gate.standingLockout ts
-  (sid, pair) <- issueSession cfg remember user ts
   publishAuthEvent (Event.MfaSucceeded (Event.MfaSucceededData uid sid ts))
   pure (user, pair)
 
@@ -311,15 +317,18 @@
   ts <- now
   BeginCeremony {optionsJson, optionsBlob} <- beginAuthenticationCeremony UVRequired []
   cid <- genCeremonyId
-  putPendingCeremony
-    PendingCeremony
-      { ceremonyId = cid,
-        userId = Nothing,
-        kind = AuthenticationCeremony,
-        optionsBlob = optionsBlob,
-        createdAt = ts,
-        expiresAt = addUTCTime (pendingCeremonyTTL (webauthnConfig cfg)) ts
-      }
+  either throwError pure
+    =<< putPendingCeremony
+      PendingCeremony
+        { authenticationGeneration = Nothing,
+          initiatingSession = Nothing,
+          ceremonyId = cid,
+          userId = Nothing,
+          kind = AuthenticationCeremony,
+          optionsBlob = optionsBlob,
+          createdAt = ts,
+          expiresAt = addUTCTime (pendingCeremonyTTL (webauthnConfig cfg)) ts
+        }
   pure (cid, optionsJson)
 
 -- | Finish a passwordless login: consume the pending ceremony, resolve the user from the
@@ -379,10 +388,16 @@
   when failureGate.locked do
     publishAuthEvent (Event.MfaFailed (Event.MfaFailedData Nothing "account_locked" ts))
     throwError MfaAssertionInvalid
+  -- Resolve and capture the user's generation BEFORE the expensive proof check.
+  assertedId <- maybe (throwError MfaAssertionInvalid) pure (assertionCredentialId assertion)
+  resolved <- maybe (throwError MfaAssertionInvalid) pure =<< findPasskeyByCredentialId assertedId
+  let PasskeyCredential {userId = resolvedUid} = resolved
+  observedUser <- maybe (throwError InvalidCredentials) pure =<< findUserById resolvedUid
   (passkey, verified) <- verifyAssertion failure Nothing optionsBlob assertion
   let PasskeyCredential {userId = pkUid, passkeyId} = passkey
       VerifiedAuthentication {newSignCounter} = verified
-  user <- maybe (throwError InvalidCredentials) pure =<< findUserById pkUid
+  let user = observedUser
+  when (pkUid /= resolvedUid) (throwError MfaAssertionInvalid)
   let User {status = userStatus} = user
   when (userStatus /= UserActive) (throwError UserNotActive)
   -- The assertion is already verified above, so the account's existence is not in question.
@@ -394,8 +409,8 @@
     throwError MfaAssertionInvalid
   won <- updatePasskeySignCounter passkeyId newSignCounter ts
   unless won (failMfa failure (Just pkUid) "signature counter replayed")
+  (sid, pair, _) <- either throwError pure =<< issueSessionWith cfg defaultSessionOptions {remember, authenticationGuard = Just ((userGuard user) {assertedPasskey = Just passkeyId})} user ts
   recordProofSuccess ctx FactorPasskey gate.standingLockout ts
-  (sid, pair) <- issueSession cfg remember user ts
   publishAuthEvent (Event.MfaSucceeded (Event.MfaSucceededData pkUid sid ts))
   pure (user, pair)
 
diff --git a/src/Shomei/OAuth/AuthorizationCode/Domain.hs b/src/Shomei/OAuth/AuthorizationCode/Domain.hs
--- a/src/Shomei/OAuth/AuthorizationCode/Domain.hs
+++ b/src/Shomei/OAuth/AuthorizationCode/Domain.hs
@@ -14,13 +14,15 @@
   )
 where
 
+import Data.Int (Int64)
 import Data.Set (Set)
 import Shomei.Authorization.Claims.Domain (Scope)
 import Shomei.Id (SessionId, UserId)
 import Shomei.Prelude
 
 data AuthorizationCode = AuthorizationCode
-  { -- | SHA-256 hex of the opaque code; the primary key
+  { authenticationGeneration :: !(Maybe Int64),
+    -- | SHA-256 hex of the opaque code; the primary key
     codeHash :: !Text,
     -- | the only client that may exchange this code
     clientId :: !Text,
diff --git a/src/Shomei/OAuth/AuthorizationCode/Store.hs b/src/Shomei/OAuth/AuthorizationCode/Store.hs
--- a/src/Shomei/OAuth/AuthorizationCode/Store.hs
+++ b/src/Shomei/OAuth/AuthorizationCode/Store.hs
@@ -21,12 +21,14 @@
 
 import Effectful (Dispatch (..), DispatchOf, Eff, Effect, (:>))
 import Effectful.Dispatch.Dynamic (send)
+import Shomei.Error (AuthError)
 import Shomei.Id (SessionId)
 import Shomei.OAuth.AuthorizationCode.Domain (AuthorizationCode, NewAuthorizationCode)
 import Shomei.Prelude
+import Shomei.Session.Authentication.Guard (AuthenticationGuard)
 
 data OAuthCodeStore :: Effect where
-  PutAuthorizationCode :: NewAuthorizationCode -> OAuthCodeStore m ()
+  PutAuthorizationCode :: AuthenticationGuard -> NewAuthorizationCode -> OAuthCodeStore m (Either AuthError ())
   -- | Redeem a code by its SHA-256 hex digest, atomically and at most once.
   --
   -- Returns the row only if it was unconsumed /and/ unexpired at the given time, and stamps
@@ -42,8 +44,8 @@
 
 type instance DispatchOf OAuthCodeStore = Dynamic
 
-putAuthorizationCode :: (OAuthCodeStore :> es) => NewAuthorizationCode -> Eff es ()
-putAuthorizationCode = send . PutAuthorizationCode
+putAuthorizationCode :: (OAuthCodeStore :> es) => AuthenticationGuard -> NewAuthorizationCode -> Eff es (Either AuthError ())
+putAuthorizationCode proofState = send . PutAuthorizationCode proofState
 
 consumeAuthorizationCode :: (OAuthCodeStore :> es) => Text -> UTCTime -> Eff es (Maybe AuthorizationCode)
 consumeAuthorizationCode h t = send (ConsumeAuthorizationCode h t)
diff --git a/src/Shomei/OAuth/Authorize/Workflow.hs b/src/Shomei/OAuth/Authorize/Workflow.hs
--- a/src/Shomei/OAuth/Authorize/Workflow.hs
+++ b/src/Shomei/OAuth/Authorize/Workflow.hs
@@ -32,7 +32,9 @@
 import Data.Time (addUTCTime)
 import Effectful (Eff, (:>))
 import Effectful.Error.Static (runErrorNoCallStack, throwError)
+import Shomei.Account.User.Store (UserStore, findUserById)
 import Shomei.Audit.Event.Domain qualified as Event
+import Shomei.Session.Authentication.Guard (AuthenticationGuard (..), userGuard)
 
 -- Imported WITHOUT (..): 'OAuthClient' shares @clientId@ / @status@ / @createdAt@ with several
 -- other domain records, which would defeat @OverloadedRecordDot@. Every field is read through a
@@ -147,7 +149,8 @@
     TokenGen :> es,
     AuthEventPublisher :> es,
     Clock :> es,
-    SessionStore :> es
+    SessionStore :> es,
+    UserStore :> es
   ) =>
   ShomeiConfig ->
   OAuthClient ->
@@ -170,19 +173,22 @@
   -- The refresh-token generator is the codebase's single CSPRNG opaque-token source (32 bytes,
   -- base64url). A code is the same kind of secret with a shorter life.
   RefreshToken code <- generateOpaqueToken
-  putAuthorizationCode
-    NewAuthorizationCode
-      { codeHash = sha256Hex code,
-        clientId = client ^. #clientId,
-        redirectUri = params.redirectUri,
-        userId = claims.subject,
-        scopes = granted,
-        nonce = params.nonce,
-        codeChallenge = challenge,
-        authTime = claims.authTime,
-        createdAt = ts,
-        expiresAt = addUTCTime (cfg ^. #oauthConfig . #authorizationCodeTTL) ts
-      }
+  user <- maybe (throwError (AuthorizeLoginRequired SessionNotLive)) pure =<< findUserById claims.subject
+  either (const (throwError (AuthorizeLoginRequired SessionNotLive))) pure
+    =<< putAuthorizationCode
+      ((userGuard user) {initiatingSession = Just claims.sessionId})
+      NewAuthorizationCode
+        { codeHash = sha256Hex code,
+          clientId = client ^. #clientId,
+          redirectUri = params.redirectUri,
+          userId = claims.subject,
+          scopes = granted,
+          nonce = params.nonce,
+          codeChallenge = challenge,
+          authTime = claims.authTime,
+          createdAt = ts,
+          expiresAt = addUTCTime (cfg ^. #oauthConfig . #authorizationCodeTTL) ts
+        }
   publishAuthEvent
     ( Event.OAuthCodeIssued
         Event.OAuthCodeIssuedData
diff --git a/src/Shomei/OAuth/TokenExchange/Workflow.hs b/src/Shomei/OAuth/TokenExchange/Workflow.hs
--- a/src/Shomei/OAuth/TokenExchange/Workflow.hs
+++ b/src/Shomei/OAuth/TokenExchange/Workflow.hs
@@ -3,15 +3,15 @@
 -- Token exchange generalizes the two delegated-token stories Shōmei already tells into one
 -- standard grant. Both modes issue a __delegation-shaped__ token — @sub@ names the represented
 -- party, @act@ names who is wielding it — through the single shared mint
--- 'Shomei.Delegation.Workflow.mintDelegatedToken', so the standards path and the bespoke
--- @\/auth\/impersonate@ endpoint cannot drift.
+-- 'Shomei.Delegation.Workflow.mintDelegatedToken', so impersonation and service on-behalf-of
+-- cannot drift in session shape or claim contents.
 --
 --   * __Impersonation mode__ — an operator holding the @impersonate:user@ scope exchanges a bare
 --     user id (@subject_token_type = urn:shomei:params:oauth:token-type:user-id@) plus their own
 --     access token as the @actor_token@, for a token that /is/ that user. This reuses
 --     'Shomei.Delegation.Workflow.startImpersonation' verbatim, so the scope gate, freshness
 --     gate, self\/active-target checks, refresh-less session, and @impersonation_started@ audit
---     event are literally the same code as the bespoke endpoint.
+--     event are shared with the library's impersonation workflow.
 --
 --   * __Service on-behalf-of mode__ — a service account (EP-4) authenticates as the OAuth client of
 --     the request and presents a user's access token as the @subject_token@. It receives a
diff --git a/src/Shomei/OAuth/TokenGrant/Workflow.hs b/src/Shomei/OAuth/TokenGrant/Workflow.hs
--- a/src/Shomei/OAuth/TokenGrant/Workflow.hs
+++ b/src/Shomei/OAuth/TokenGrant/Workflow.hs
@@ -57,6 +57,7 @@
 import Shomei.OAuth.IdToken.Domain (IdToken, IdTokenClaims (..))
 import Shomei.Prelude
 import Shomei.ServiceAccount.Secret (sha256Hex, verifyServiceSecret)
+import Shomei.Session.Authentication.Guard (AuthenticationGuard (..))
 import Shomei.Session.Authentication.Workflow qualified as Wf
 import Shomei.Session.Command (RefreshCommand (..), RefreshOrigin (OAuthClientRefresh))
 import Shomei.Session.RefreshToken.Domain (RefreshToken)
@@ -190,13 +191,15 @@
     unless ((u ^. #status) == UserActive) (throwError (GrantInvalidGrant "the code's user is not active"))
     either (const (throwError (GrantInvalidGrant "the code's user has not verified their email"))) pure (ensureEmailVerified cfg u)
     pure u
+  generation <- maybe (throwError (GrantInvalidGrant "legacy authentication state")) pure (row ^. #authenticationGeneration)
   let granted = row ^. #scopes
   (sid, pair, claims) <-
-    issueSessionWith
-      cfg
-      SessionOptions {oauthClientId = Just (cmd ^. #clientId), extraScopes = granted, remember = False}
-      user
-      ts
+    either (const (throwError (GrantInvalidGrant "authentication state changed"))) pure
+      =<< issueSessionWith
+        cfg
+        SessionOptions {oauthClientId = Just (cmd ^. #clientId), extraScopes = granted, remember = False, authenticationGuard = Just (AuthenticationGuard generation Nothing Nothing)}
+        user
+        ts
   bindAuthorizationCodeSession (row ^. #codeHash) sid
   idToken <-
     if Scope "openid" `Set.member` granted
diff --git a/src/Shomei/Passkey/Ceremony/Store.hs b/src/Shomei/Passkey/Ceremony/Store.hs
--- a/src/Shomei/Passkey/Ceremony/Store.hs
+++ b/src/Shomei/Passkey/Ceremony/Store.hs
@@ -26,19 +26,20 @@
 
 import Effectful (Dispatch (Dynamic), DispatchOf, Eff, Effect, (:>))
 import Effectful.Dispatch.Dynamic (send)
+import Shomei.Error (AuthError)
 import Shomei.Id (CeremonyId)
 import Shomei.Passkey.Domain (PendingCeremony)
 import Shomei.Prelude
 
 data PendingCeremonyStore :: Effect where
-  PutPendingCeremony :: PendingCeremony -> PendingCeremonyStore m ()
+  PutPendingCeremony :: PendingCeremony -> PendingCeremonyStore m (Either AuthError ())
   -- | Consume-once: remove the row and return it iff present AND @expiresAt > now@;
   -- otherwise return 'Nothing' (removing an expired row too). @now@ is the second arg.
   TakePendingCeremony :: CeremonyId -> UTCTime -> PendingCeremonyStore m (Maybe PendingCeremony)
 
 type instance DispatchOf PendingCeremonyStore = Dynamic
 
-putPendingCeremony :: (PendingCeremonyStore :> es) => PendingCeremony -> Eff es ()
+putPendingCeremony :: (PendingCeremonyStore :> es) => PendingCeremony -> Eff es (Either AuthError ())
 putPendingCeremony = send . PutPendingCeremony
 
 takePendingCeremony :: (PendingCeremonyStore :> es) => CeremonyId -> UTCTime -> Eff es (Maybe PendingCeremony)
diff --git a/src/Shomei/Passkey/Domain.hs b/src/Shomei/Passkey/Domain.hs
--- a/src/Shomei/Passkey/Domain.hs
+++ b/src/Shomei/Passkey/Domain.hs
@@ -35,10 +35,11 @@
 import Data.Base64.Types (extractBase64)
 import Data.ByteString (ByteString)
 import Data.ByteString.Base64.URL qualified as B64U
+import Data.Int (Int64)
 import Data.Text qualified as Text
 import Data.Text.Encoding qualified as TE
 import Data.Word (Word32)
-import Shomei.Id (CeremonyId, PasskeyId, UserId)
+import Shomei.Id (CeremonyId, PasskeyId, SessionId, UserId)
 import Shomei.Prelude
 
 -- | Per-ceremony WebAuthn user-verification policy. Kept in the pure passkey domain so the
@@ -127,7 +128,9 @@
 
 -- | The short-lived challenge/options state (EP-1 defines; EP-2 persists).
 data PendingCeremony = PendingCeremony
-  { ceremonyId :: !CeremonyId,
+  { authenticationGeneration :: !(Maybe Int64),
+    initiatingSession :: !(Maybe SessionId),
+    ceremonyId :: !CeremonyId,
     userId :: !(Maybe UserId),
     kind :: !CeremonyKind,
     optionsBlob :: !ByteString,
diff --git a/src/Shomei/Passkey/Store.hs b/src/Shomei/Passkey/Store.hs
--- a/src/Shomei/Passkey/Store.hs
+++ b/src/Shomei/Passkey/Store.hs
@@ -38,10 +38,11 @@
     WebAuthnCredentialId,
   )
 import Shomei.Prelude
+import Shomei.Session.Authentication.Guard (AuthenticationGuard)
 
 data PasskeyStore :: Effect where
   -- | Atomically count and insert within the requested 1–100 credential ceiling.
-  CreatePasskey :: Int -> NewPasskeyCredential -> PasskeyStore m (Either AuthError PasskeyCredential)
+  CreatePasskey :: AuthenticationGuard -> Int -> NewPasskeyCredential -> PasskeyStore m (Either AuthError PasskeyCredential)
   FindPasskeysByUser :: UserId -> PasskeyStore m [PasskeyCredential]
   FindPasskeyByCredentialId :: WebAuthnCredentialId -> PasskeyStore m (Maybe PasskeyCredential)
   FindPasskeysByUserHandle :: UserHandle -> PasskeyStore m [PasskeyCredential]
@@ -54,10 +55,10 @@
 
 type instance DispatchOf PasskeyStore = Dynamic
 
-createPasskey :: (PasskeyStore :> es) => Int -> NewPasskeyCredential -> Eff es (Either AuthError PasskeyCredential)
-createPasskey limit credential
+createPasskey :: (PasskeyStore :> es) => AuthenticationGuard -> Int -> NewPasskeyCredential -> Eff es (Either AuthError PasskeyCredential)
+createPasskey proofState limit credential
   | maybe False ((> 128) . Text.length) credential.label = pure (Left InvalidInput)
-  | otherwise = send (CreatePasskey limit credential)
+  | otherwise = send (CreatePasskey proofState limit credential)
 
 findPasskeysByUser :: (PasskeyStore :> es) => UserId -> Eff es [PasskeyCredential]
 findPasskeysByUser = send . FindPasskeysByUser
diff --git a/src/Shomei/Passkey/Workflow.hs b/src/Shomei/Passkey/Workflow.hs
--- a/src/Shomei/Passkey/Workflow.hs
+++ b/src/Shomei/Passkey/Workflow.hs
@@ -34,7 +34,7 @@
 import Shomei.Audit.Publisher.Store (AuthEventPublisher, publishAuthEvent)
 import Shomei.Config (ShomeiConfig (..), WebAuthnConfig (..))
 import Shomei.Error (AuthError (..))
-import Shomei.Id (CeremonyId, PasskeyId, UserId, genCeremonyId, userIdToUUID)
+import Shomei.Id (CeremonyId, PasskeyId, SessionId, UserId, genCeremonyId, userIdToUUID)
 import Shomei.Passkey.Ceremony.Port
   ( BeginCeremony (..),
     CredentialUserInfo (..),
@@ -53,6 +53,7 @@
   )
 import Shomei.Passkey.Store (PasskeyStore, createPasskey, deletePasskey, findPasskeysByUser)
 import Shomei.Prelude
+import Shomei.Session.Authentication.Guard (AuthenticationGuard (..), userGuard)
 import Shomei.Time.Store (Clock, now)
 
 -- | Derive a stable WebAuthn user handle from the Shōmei user id: the 16 bytes of the
@@ -78,8 +79,9 @@
   ) =>
   ShomeiConfig ->
   UserId ->
+  Maybe SessionId ->
   Eff es (Either AuthError (CeremonyId, Value))
-beginPasskeyRegistration cfg uid = runErrorNoCallStack do
+beginPasskeyRegistration cfg uid sourceSession = runErrorNoCallStack do
   ts <- now
   user <- maybe (throwError InvalidCredentials) pure =<< findUserById uid
   existing <- findPasskeysByUser uid
@@ -97,15 +99,18 @@
       excludeIds = map (\PasskeyCredential {credentialId} -> credentialId) existing
   BeginCeremony {optionsJson, optionsBlob} <- beginRegistrationCeremony info excludeIds
   ceremonyId <- genCeremonyId
-  putPendingCeremony
-    PendingCeremony
-      { ceremonyId = ceremonyId,
-        userId = Just uid,
-        kind = RegistrationCeremony,
-        optionsBlob = optionsBlob,
-        createdAt = ts,
-        expiresAt = addUTCTime (pendingCeremonyTTL (webauthnConfig cfg)) ts
-      }
+  either throwError pure
+    =<< putPendingCeremony
+      PendingCeremony
+        { authenticationGeneration = Just user.authenticationGeneration,
+          initiatingSession = sourceSession,
+          ceremonyId = ceremonyId,
+          userId = Just uid,
+          kind = RegistrationCeremony,
+          optionsBlob = optionsBlob,
+          createdAt = ts,
+          expiresAt = addUTCTime (pendingCeremonyTTL (webauthnConfig cfg)) ts
+        }
   pure (ceremonyId, optionsJson)
 
 completePasskeyRegistration ::
@@ -124,17 +129,19 @@
 completePasskeyRegistration cfg uid ceremonyId credentialJson mLabel = runErrorNoCallStack do
   when (maybe False ((> 128) . Text.length) mLabel) (throwError InvalidInput)
   ts <- now
-  PendingCeremony {kind, userId = pendingUid, optionsBlob} <-
+  PendingCeremony {kind, userId = pendingUid, optionsBlob, authenticationGeneration, initiatingSession} <-
     maybe (throwError PendingCeremonyNotFound) pure =<< takePendingCeremony ceremonyId ts
   -- Reject a ceremony that is not a registration, or that was begun for a different user.
   when (kind /= RegistrationCeremony) (throwError PendingCeremonyNotFound)
   when (pendingUid /= Just uid) (throwError PendingCeremonyNotFound)
+  generation <- maybe (throwError StaleAuthentication) pure authenticationGeneration
   VerifiedRegistration {credentialId, userHandle, publicKey, signCounter, transports} <-
     either (throwError . WebAuthnCeremonyError) pure
       =<< completeRegistrationCeremony optionsBlob credentialJson
   passkey <-
     either throwError pure
       =<< createPasskey
+        (AuthenticationGuard generation initiatingSession Nothing)
         cfg.maxPasskeysPerUser
         NewPasskeyCredential
           { userId = uid,
diff --git a/src/Shomei/Session/Authentication/Guard.hs b/src/Shomei/Session/Authentication/Guard.hs
new file mode 100644
--- /dev/null
+++ b/src/Shomei/Session/Authentication/Guard.hs
@@ -0,0 +1,18 @@
+-- | State observed before checking a proof. Persistence checks it under the user lock.
+module Shomei.Session.Authentication.Guard (AuthenticationGuard (..), userGuard) where
+
+import Data.Int (Int64)
+import Shomei.Account.User.Domain (User (..))
+import Shomei.Id (PasskeyId, SessionId)
+import Shomei.Prelude
+
+data AuthenticationGuard = AuthenticationGuard
+  { generation :: !Int64,
+    initiatingSession :: !(Maybe SessionId),
+    assertedPasskey :: !(Maybe PasskeyId)
+  }
+  deriving stock (Generic, Eq, Show)
+  deriving anyclass (FromJSON, ToJSON)
+
+userGuard :: User -> AuthenticationGuard
+userGuard user = AuthenticationGuard user.authenticationGeneration Nothing Nothing
diff --git a/src/Shomei/Session/Authentication/Workflow.hs b/src/Shomei/Session/Authentication/Workflow.hs
--- a/src/Shomei/Session/Authentication/Workflow.hs
+++ b/src/Shomei/Session/Authentication/Workflow.hs
@@ -60,6 +60,7 @@
 import Shomei.Passkey.Ceremony.Store (PendingCeremonyStore)
 import Shomei.Passkey.Store (PasskeyStore, countPasskeysByUser)
 import Shomei.Prelude
+import Shomei.Session.Authentication.Guard (userGuard)
 import Shomei.Session.Command (ClientContext (..), LoginCommand (..), LogoutCommand (..), RefreshCommand (..), RefreshOrigin (..), SignupCommand (..))
 import Shomei.Session.Domain (NewSession (..), Session (..), SessionKind (InteractiveSession), SessionStatus (SessionActive))
 import Shomei.Session.LoginAttempt.Domain (AccountLockout (..), AttemptFactor (FactorPassword), FailureOutcome (..))
@@ -156,7 +157,8 @@
   -- Session row, refresh-token row, and both audit events in one transaction: a crash here
   -- leaves the new user with no session rather than a session with no token.
   (session, _token) <-
-    persistNewSession
+    either throwError pure =<< persistNewSession
+      (userGuard user)
       NewSession
         { userId = user.userId,
           createdAt = ts,
@@ -239,12 +241,13 @@
   -- time.
   mCred <- findPasswordCredentialByLoginId cmd.loginId
   cred <- maybe (failLoginTimed rl outcome ctx cmd ts) pure mCred
+  -- Capture the generation before checking the password, including the non-MFA path.
+  mUser <- findUserById cred.userId
   ok <- verifyPassword cmd.password cred.passwordHash
   unless ok (failLogin rl outcome ctx (Just cred.userId) ts)
   -- The password hash was already evaluated, so the missing-user and inactive-user branches do
-  -- not need a dummy hash. Keeping the user lookup after verification also leaves the common
-  -- wrong-password path at four database checkouts, including its audit event.
-  mUser <- findUserById cred.userId
+  -- not need a dummy hash. The user snapshot above retains the generation observed before
+  -- verification, so recovery cannot attach a newer generation to this proof.
   user <- maybe (failLogin rl outcome ctx (Just cred.userId) ts) pure mUser
   when (user.status /= UserActive) do
     publishNewLock rl outcome ctx ts
@@ -261,16 +264,16 @@
   let hasSecondFactor = passkeyCount > 0 || totpEnrolled
   if requireSecondFactor (mfaConfig cfg) && hasSecondFactor
     then do
-      (cid, optionsJson, methods) <- prepareMfaChallenge cfg user ts
+      (cid, optionsJson, methods) <- either throwError pure =<< prepareMfaChallenge cfg user ts
       -- A correct password that advances to MFA is neither a failed proof nor a fully
       -- authenticated success. Remove its provisional row without resetting earlier failures.
       discardLoginAttempt outcome.attemptId
       when outcome.lockedNow (clearAccountLockout ctx.accountKey)
       pure (MfaRequired MfaChallenge {ceremonyId = cid, options = optionsJson, methods = methods})
     else do
+      (_sid, pair) <- either throwError pure =<< issueSession cfg cmd.remember user ts
       convertLoginAttemptToSuccess outcome.attemptId
       when (outcome.lockedNow || isJust outcome.priorLockout) (clearAccountLockout ctx.accountKey)
-      (_sid, pair) <- issueSession cfg cmd.remember user ts
       pure (LoginComplete user pair)
 
 -- | 'failLogin' preceded by a dummy Argon2id verification, for the login paths that fail
@@ -422,6 +425,7 @@
                           }
                         (Event.RefreshTokenRotated (Event.RefreshTokenRotatedData tok.sessionId tok.refreshTokenId ts))
                     case outcome of
+                      RotationInvalid -> pure (Left SessionRevoked)
                       RotationConflict -> reuseDetected tok ts
                       Rotated _ -> do
                         -- Re-running the enrichment here is what makes a role change take
diff --git a/src/Shomei/Session/Domain.hs b/src/Shomei/Session/Domain.hs
--- a/src/Shomei/Session/Domain.hs
+++ b/src/Shomei/Session/Domain.hs
@@ -3,6 +3,9 @@
 module Shomei.Session.Domain
   ( SessionStatus (..),
     SessionKind (..),
+    sessionKindToText,
+    sessionKindFromText,
+    sessionInvolves,
     Session (..),
     NewSession (..),
   )
@@ -30,6 +33,21 @@
   deriving stock (Generic, Eq, Show)
   deriving anyclass (FromJSON, ToJSON)
 
+-- | The one spelling of a session kind, shared by persistence and the introspection
+-- @session_kind@ member so the stored value and the wire value cannot drift.
+sessionKindToText :: SessionKind -> Text
+sessionKindToText = \case
+  InteractiveSession -> "interactive"
+  MachineSession -> "machine"
+  DelegatedSession -> "delegated"
+
+sessionKindFromText :: Text -> Either Text SessionKind
+sessionKindFromText = \case
+  "interactive" -> Right InteractiveSession
+  "machine" -> Right MachineSession
+  "delegated" -> Right DelegatedSession
+  t -> Left ("unknown session kind: " <> t)
+
 data Session = Session
   { sessionId :: !SessionId,
     userId :: !UserId,
@@ -81,3 +99,9 @@
   }
   deriving stock (Generic, Eq, Show)
   deriving anyclass (FromJSON, ToJSON)
+
+-- | Is this principal the session's subject or its delegated actor? Revoking a principal's
+-- sessions uses this, so a suspended operator or revoked service account also loses the
+-- delegated sessions in which it acts for somebody else.
+sessionInvolves :: UserId -> Session -> Bool
+sessionInvolves uid session = session.userId == uid || session.actor == Just uid
diff --git a/src/Shomei/Session/UnitOfWork/Store.hs b/src/Shomei/Session/UnitOfWork/Store.hs
--- a/src/Shomei/Session/UnitOfWork/Store.hs
+++ b/src/Shomei/Session/UnitOfWork/Store.hs
@@ -21,6 +21,7 @@
     NewSessionToken (..),
     RotationOutcome (..),
     persistNewSession,
+    resetSecondFactors,
     rotateRefreshToken,
     completePasswordReset,
     completePasswordChange,
@@ -31,10 +32,14 @@
 
 import Effectful (Dispatch (..), DispatchOf, Eff, Effect, (:>))
 import Effectful.Dispatch.Dynamic (send)
+import Shomei.Account.Admin.Recovery.Domain (RecoveryActor, RecoveryCommand, RecoveryResult)
+import Shomei.Account.Email.Domain (Email)
 import Shomei.Account.Password.Domain (PasswordHash)
 import Shomei.Audit.Event.Domain (AuthEvent)
+import Shomei.Error (AuthError)
 import Shomei.Id (PasswordResetTokenId, RefreshTokenId, SessionId, UserId)
 import Shomei.Prelude
+import Shomei.Session.Authentication.Guard (AuthenticationGuard)
 import Shomei.Session.Domain (NewSession, Session)
 import Shomei.Session.RefreshToken.Domain (NewRefreshToken, PersistedRefreshToken, RefreshTokenHash)
 
@@ -60,6 +65,7 @@
 -- confirmation.
 data RotationOutcome
   = Rotated !PersistedRefreshToken
+  | RotationInvalid
   | RotationConflict
   deriving stock (Generic, Eq, Show)
 
@@ -72,11 +78,13 @@
   -- @UserRegistered@ + @SessionStarted@, login and MFA completion publish @LoginSucceeded@ +
   -- @SessionStarted@. The builder lets each caller author its own events in the workflow layer
   -- while the interpreter supplies the id.
+  ResetUserSecondFactors :: RecoveryActor -> UserId -> RecoveryCommand -> UTCTime -> AuthUnitOfWork m (Either AuthError (RecoveryResult, Maybe Email))
   PersistNewSession ::
+    AuthenticationGuard ->
     NewSession ->
     NewSessionToken ->
     (SessionId -> [AuthEvent]) ->
-    AuthUnitOfWork m (Session, PersistedRefreshToken)
+    AuthUnitOfWork m (Either AuthError (Session, PersistedRefreshToken))
   -- | Mark the presented refresh token used, insert its replacement, and record the rotation
   -- event — atomically. The 'UTCTime' is the @used_at@ stamp for the token being retired.
   --
@@ -119,11 +127,12 @@
 -- | Atomically persist a new session, its first refresh token, and the events naming it.
 persistNewSession ::
   (AuthUnitOfWork :> es) =>
+  AuthenticationGuard ->
   NewSession ->
   NewSessionToken ->
   (SessionId -> [AuthEvent]) ->
-  Eff es (Session, PersistedRefreshToken)
-persistNewSession ns nst mkEvents = send (PersistNewSession ns nst mkEvents)
+  Eff es (Either AuthError (Session, PersistedRefreshToken))
+persistNewSession proofState ns nst mkEvents = send (PersistNewSession proofState ns nst mkEvents)
 
 -- | Atomically retire a refresh token and issue its replacement, or report a conflict.
 rotateRefreshToken ::
@@ -171,3 +180,6 @@
 -- Arguments are actor, target and the application clock timestamp. Returns the winner count.
 revokeUserSessionsWithAudit :: (AuthUnitOfWork :> es) => UserId -> UserId -> UTCTime -> Eff es Int
 revokeUserSessionsWithAudit actor target ts = send (RevokeUserSessionsWithAudit actor target ts)
+
+resetSecondFactors :: (AuthUnitOfWork :> es) => RecoveryActor -> UserId -> RecoveryCommand -> UTCTime -> Eff es (Either AuthError (RecoveryResult, Maybe Email))
+resetSecondFactors actor uid cmd ts = send (ResetUserSecondFactors actor uid cmd ts)
diff --git a/src/Shomei/Session/Workflow.hs b/src/Shomei/Session/Workflow.hs
--- a/src/Shomei/Session/Workflow.hs
+++ b/src/Shomei/Session/Workflow.hs
@@ -30,6 +30,7 @@
 import Data.Set qualified as Set
 import Data.Time (addUTCTime)
 import Effectful (Eff, (:>))
+import Effectful.Error.Static (runErrorNoCallStack, throwError)
 import Shomei.Account.User.Domain (User (..))
 import Shomei.Audit.Event.Domain qualified as Event
 import Shomei.Authorization.Claims.Domain (AuthClaims (..), Scope, mkExtraClaims, noExtraClaims)
@@ -39,6 +40,7 @@
 import Shomei.Error (AuthError (..))
 import Shomei.Id (SessionId, UserId)
 import Shomei.Prelude
+import Shomei.Session.Authentication.Guard (AuthenticationGuard, userGuard)
 import Shomei.Session.Domain (NewSession (..), Session (..), SessionKind (InteractiveSession), SessionStatus (SessionActive))
 import Shomei.Session.Store (SessionStore, findSessionById)
 import Shomei.Session.Token.Domain (TokenPair (..))
@@ -158,12 +160,13 @@
     extraScopes :: !(Set Scope),
     -- | the person asked to stay signed in: the session lasts 'rememberedSessionTTL' instead of
     --     'sessionTTL' and every token pair it yields reports @remembered@.
-    remember :: !Bool
+    remember :: !Bool,
+    authenticationGuard :: !(Maybe AuthenticationGuard)
   }
   deriving stock (Generic, Eq, Show)
 
 defaultSessionOptions :: SessionOptions
-defaultSessionOptions = SessionOptions {oauthClientId = Nothing, extraScopes = Set.empty, remember = False}
+defaultSessionOptions = SessionOptions {oauthClientId = Nothing, extraScopes = Set.empty, remember = False, authenticationGuard = Nothing}
 
 issueSession ::
   ( AuthUnitOfWork :> es,
@@ -177,10 +180,8 @@
   Bool ->
   User ->
   UTCTime ->
-  Eff es (SessionId, TokenPair)
-issueSession cfg remember user ts = do
-  (sid, pair, _claims) <- issueSessionWith cfg defaultSessionOptions {remember} user ts
-  pure (sid, pair)
+  Eff es (Either AuthError (SessionId, TokenPair))
+issueSession cfg remember user ts = fmap (fmap (\(sid, pair, _) -> (sid, pair))) (issueSessionWith cfg defaultSessionOptions {remember} user ts)
 
 -- | 'issueSession' with the OAuth-specific knobs, and returning the claims it signed.
 --
@@ -198,13 +199,14 @@
   SessionOptions ->
   User ->
   UTCTime ->
-  Eff es (SessionId, TokenPair, AuthClaims)
-issueSessionWith cfg opts user ts = do
+  Eff es (Either AuthError (SessionId, TokenPair, AuthClaims))
+issueSessionWith cfg opts user ts = runErrorNoCallStack do
   rawToken <- generateOpaqueToken
   tokHash <- hashRefreshToken rawToken
   let sessionExpiresAt = addUTCTime (if opts.remember then cfg.rememberedSessionTTL else cfg.sessionTTL) ts
   (session, _token) <-
-    persistNewSession
+    either throwError pure =<< persistNewSession
+      (fromMaybe (userGuard user) opts.authenticationGuard)
       NewSession
         { userId = user.userId,
           createdAt = ts,
diff --git a/src/Shomei/Test/InMemory.hs b/src/Shomei/Test/InMemory.hs
--- a/src/Shomei/Test/InMemory.hs
+++ b/src/Shomei/Test/InMemory.hs
@@ -78,6 +78,7 @@
 import Data.UUID qualified as UUID
 import Effectful (Eff, IOE, runEff, (:>))
 import Effectful.Dispatch.Dynamic (interpret_)
+import Shomei.Account.Admin.Recovery.Domain
 import Shomei.Account.Credential.Domain (Credential (..))
 import Shomei.Account.Credential.Store (CredentialStore (..))
 import Shomei.Account.LoginId.Domain (LoginId)
@@ -106,7 +107,7 @@
 import Shomei.Authorization.Claims.Domain (AuthClaims, Issuer (..), Permission (..), Role (..))
 import Shomei.Authorization.Claims.Store (ClaimsDelta, ClaimsEnricher, emptyClaimsDelta, runClaimsEnricherNull, runClaimsEnricherPure)
 import Shomei.Authorization.Role.Store (RoleDefinition (..), RoleStore (..))
-import Shomei.Error (AuthError (PasskeyLimitReached, SessionLimitReached), TokenError (..))
+import Shomei.Error (AuthError (InvalidUserStatus, PasskeyLimitReached, SessionLimitReached, StaleAuthentication, UserNotFound), TokenError (..))
 import Shomei.Id
   ( CeremonyId,
     LoginAttemptId,
@@ -178,7 +179,8 @@
     ServiceAccountStatus (..),
   )
 import Shomei.ServiceAccount.Store (ServiceAccountStore (..))
-import Shomei.Session.Domain (NewSession (..), Session (..), SessionKind (..), SessionStatus (..))
+import Shomei.Session.Authentication.Guard (AuthenticationGuard (..))
+import Shomei.Session.Domain (NewSession (..), Session (..), SessionKind (..), SessionStatus (..), sessionInvolves)
 import Shomei.Session.LoginAttempt.Domain
   ( AccountKey,
     AccountLockout (..),
@@ -356,7 +358,8 @@
               status = UserActive,
               emailVerifiedAt = Nothing,
               createdAt = w.clock,
-              updatedAt = w.clock
+              updatedAt = w.clock,
+              authenticationGeneration = 0
             }
     liftIO (modifyWorld ref (#users %~ Map.insert uid u))
     pure u
@@ -453,8 +456,8 @@
   RevokeAllUserSessions uid t ->
     liftIO
       ( atomicModifyIORef' ref \w ->
-          let winners = [s.sessionId | s <- Map.elems w.sessions, s.userId == uid, s.status == SessionActive]
-           in (w & #sessions %~ Map.map (\s -> if s.userId == uid then revoke t s else s), winners)
+          let winners = [s.sessionId | s <- Map.elems w.sessions, sessionInvolves uid s, s.status == SessionActive]
+           in (w & #sessions %~ Map.map (\s -> if sessionInvolves uid s then revoke t s else s), winners)
       )
   ListSessionPage uid query -> liftIO do
     w <- readIORef ref
@@ -634,7 +637,7 @@
 -- a workflow authors ends up at the head.
 runAuthUnitOfWork :: (IOE :> es) => IORef World -> Eff (AuthUnitOfWork : es) a -> Eff es a
 runAuthUnitOfWork ref = interpret_ \case
-  PersistNewSession ns nst mkEvents -> do
+  PersistNewSession proofState ns nst mkEvents -> do
     sid <- genSessionId
     rid <- genRefreshTokenId
     let session = mkSession sid ns
@@ -649,21 +652,29 @@
         persisted = mkPersisted rid newToken
         events = mkEvents sid
     liftIO
-      ( modifyWorld
-          ref
-          ( (#sessions %~ Map.insert sid session)
-              . (#refreshTokens %~ Map.insert rid persisted)
-              . (#refreshByHash %~ Map.insert nst.tokenHash rid)
-              . (#publishedEvents %~ (reverse events <>))
-          )
+      ( atomicModifyIORef' ref \w ->
+          if authenticationValid w ns.userId proofState ns.createdAt
+            then
+              ( w
+                  & #sessions
+                  %~ Map.insert sid session
+                  & #refreshTokens
+                  %~ Map.insert rid persisted
+                  & #refreshByHash
+                  %~ Map.insert nst.tokenHash rid
+                  & #publishedEvents
+                  %~ (reverse events <>),
+                Right (session, persisted)
+              )
+            else (w, Left StaleAuthentication)
       )
-    pure (session, persisted)
   RotateRefreshToken presentedId usedAt newToken ev -> do
     rid <- genRefreshTokenId
     let persisted = mkPersisted rid newToken
     liftIO
       ( atomicModifyIORef' ref \w -> case Map.lookup presentedId w.refreshTokens of
           Just tok
+            | not (maybe False (\s -> s.status == SessionActive && s.expiresAt > usedAt) (Map.lookup tok.sessionId w.sessions)) -> (w, RotationInvalid)
             | tok.status == RefreshTokenActive ->
                 ( w
                     & #refreshTokens
@@ -713,10 +724,61 @@
                 & #publishedEvents
                 %~ (reverse events <>)
       )
+  ResetUserSecondFactors actor uid cmd ts ->
+    liftIO
+      ( atomicModifyIORef' ref \w ->
+          case Map.lookup uid w.users of
+            Nothing -> (w, Left UserNotFound)
+            Just user | user.status /= UserActive -> (w, Left InvalidUserStatus)
+            Just user ->
+              let mine s = s.userId == uid
+                  winners = [s | s <- Map.elems w.sessions, mine s, s.status == SessionActive]
+                  userTokens = [t | t <- Map.elems w.refreshTokens, maybe False mine (Map.lookup t.sessionId w.sessions), t.status /= RefreshTokenRevoked]
+                  myCeremony PendingCeremony {userId} = userId == Just uid
+                  myTotp TotpCredential {userId} = userId == uid
+                  myCode RecoveryCode {userId} = userId == uid
+                  myAuthCode AuthorizationCode {userId} = userId == uid
+                  counts =
+                    RecoveryCounts
+                      (length (filter ((== uid) . pkUserId) (Map.elems w.passkeys)))
+                      (length (filter myTotp (Map.elems w.totpCredentials)))
+                      (length (filter myCode (Map.elems w.recoveryCodes)))
+                      (length (filter myCeremony (Map.elems w.pendingCeremonies)))
+                      (length winners)
+                      (length userTokens)
+                      (length (filter myAuthCode (Map.elems w.oauthCodes)))
+                      (length [t | t <- Map.elems w.passwordResetTokens, t.userId == uid, t.status == OneTimeTokenActive])
+                  events =
+                    Event.UserSecondFactorsReset (Event.UserSecondFactorsResetData uid actor cmd.caseReference counts ts)
+                      : [Event.SessionRevoked (Event.SessionRevokedData s.sessionId (recoveryActorUser actor) ts) | s <- winners]
+                  w' =
+                    w
+                      & #users
+                      %~ Map.insert uid (user & #authenticationGeneration %~ (+ 1))
+                      & #passkeys
+                      %~ Map.filter ((/= uid) . pkUserId)
+                      & #totpCredentials
+                      %~ Map.filter (not . myTotp)
+                      & #recoveryCodes
+                      %~ Map.filter (not . myCode)
+                      & #pendingCeremonies
+                      %~ Map.filter (not . myCeremony)
+                      & #oauthCodes
+                      %~ Map.filter (not . myAuthCode)
+                      & #passwordResetTokens
+                      %~ Map.map (\t -> if t.userId == uid && t.status == OneTimeTokenActive then t & #status .~ OneTimeTokenRevoked & #revokedAt .~ Just ts else t)
+                      & #sessions
+                      %~ Map.map (revokeUserSession uid ts)
+                      & #refreshTokens
+                      %~ Map.map (revokeUserRefreshToken w.sessions uid ts)
+                      & #publishedEvents
+                      %~ (reverse events <>)
+               in (w', Right (RecoveryResult ts counts (isJust user.email && isJust user.emailVerifiedAt), if isJust user.emailVerifiedAt then user.email else Nothing))
+      )
   RevokeUserSessionsWithAudit actor uid ts ->
     liftIO
       ( atomicModifyIORef' ref \w ->
-          let winners = [s | s <- Map.elems w.sessions, s.userId == uid, s.status == SessionActive]
+          let winners = [s | s <- Map.elems w.sessions, sessionInvolves uid s, s.status == SessionActive]
               ids = Set.fromList (map (.sessionId) winners)
               events = [Event.SessionRevoked (Event.SessionRevokedData s.sessionId (Just actor) ts) | s <- winners]
            in ( w
@@ -758,7 +820,7 @@
       | credential.userId == uid = credential & #passwordHash .~ h & #updatedAt .~ ts
       | otherwise = credential
     revokeUserSession uid t session
-      | session.userId == uid,
+      | sessionInvolves uid session,
         session.status == SessionActive =
           revokeSessionAt t session
       | otherwise = session
@@ -973,7 +1035,7 @@
 
 runPasskeyStore :: (IOE :> es) => IORef World -> Eff (PasskeyStore : es) a -> Eff es a
 runPasskeyStore ref = interpret_ \case
-  CreatePasskey limit NewPasskeyCredential {userId, credentialId, userHandle, publicKey, signCounter, transports, label, createdAt} -> do
+  CreatePasskey proofState limit NewPasskeyCredential {userId, credentialId, userHandle, publicKey, signCounter, transports, label, createdAt} -> do
     pid <- genPasskeyId
     let pc =
           PasskeyCredential
@@ -990,9 +1052,12 @@
             }
     liftIO
       ( atomicModifyIORef' ref \w ->
-          if limit < 1 || limit > 100 || length [p | p <- Map.elems w.passkeys, pkUserId p == userId] >= limit
-            then (w, Left PasskeyLimitReached)
-            else (w & #passkeys %~ Map.insert pid pc, Right pc)
+          if not (authenticationValid w userId proofState createdAt)
+            then (w, Left StaleAuthentication)
+            else
+              if limit < 1 || limit > 100 || length [p | p <- Map.elems w.passkeys, pkUserId p == userId] >= limit
+                then (w, Left PasskeyLimitReached)
+                else (w & #passkeys %~ Map.insert pid pc, Right pc)
       )
   FindPasskeysByUser uid ->
     liftIO ((\w -> [p | p <- Map.elems w.passkeys, pkUserId p == uid]) <$> readIORef ref)
@@ -1015,8 +1080,17 @@
 
 runPendingCeremonyStore :: (IOE :> es) => IORef World -> Eff (PendingCeremonyStore : es) a -> Eff es a
 runPendingCeremonyStore ref = interpret_ \case
-  PutPendingCeremony pc ->
-    liftIO (modifyWorld ref (#pendingCeremonies %~ Map.insert (pcCeremonyId pc) pc))
+  PutPendingCeremony pc@PendingCeremony {userId, authenticationGeneration, initiatingSession, createdAt} ->
+    liftIO
+      ( atomicModifyIORef' ref \w ->
+          let valid = case (userId, authenticationGeneration) of
+                (Nothing, _) -> True
+                (Just uid, Just generation) -> authenticationValid w uid (AuthenticationGuard generation initiatingSession Nothing) createdAt
+                _ -> False
+           in if valid
+                then (w & #pendingCeremonies %~ Map.insert (pcCeremonyId pc) pc, Right ())
+                else (w, Left StaleAuthentication)
+      )
   TakePendingCeremony cid now' -> liftIO do
     atomicModifyIORef' ref \w -> case Map.lookup cid w.pendingCeremonies of
       Nothing -> (w, Nothing)
@@ -1072,7 +1146,15 @@
     liftIO
       ( modifyWorld
           ref
-          (#serviceAccounts %~ Map.adjust (\sa -> sa & #status .~ ServiceAccountRevoked & #revokedAt .~ Just t) sid)
+          ( \w ->
+              let backing = (\ServiceAccount {userId} -> userId) <$> Map.lookup sid w.serviceAccounts
+                  held s = s.status == SessionActive && s.kind /= InteractiveSession && maybe False (`sessionInvolves` s) backing
+               in w
+                    & #serviceAccounts
+                    %~ Map.adjust (\sa -> sa & #status .~ ServiceAccountRevoked & #revokedAt .~ Just t) sid
+                    & #sessions
+                    %~ Map.map (\s -> if held s then s & #status .~ SessionRevoked & #revokedAt .~ Just t else s)
+          )
       )
 
 -- | Field accessors for the EP-5 OAuth-client records, for the same 'DuplicateRecordFields'
@@ -1135,10 +1217,11 @@
 -- racing consumes of one code, exactly one sees an unconsumed row.
 runOAuthCodeStore :: (IOE :> es) => IORef World -> Eff (OAuthCodeStore : es) a -> Eff es a
 runOAuthCodeStore ref = interpret_ \case
-  PutAuthorizationCode NewAuthorizationCode {codeHash, clientId, redirectUri, userId, scopes, nonce, codeChallenge, authTime, createdAt, expiresAt} -> do
+  PutAuthorizationCode proofState NewAuthorizationCode {codeHash, clientId, redirectUri, userId, scopes, nonce, codeChallenge, authTime, createdAt, expiresAt} -> do
     let code =
           AuthorizationCode
-            { codeHash,
+            { authenticationGeneration = Just proofState.generation,
+              codeHash,
               clientId,
               redirectUri,
               userId,
@@ -1151,7 +1234,12 @@
               consumedAt = Nothing,
               sessionId = Nothing
             }
-    liftIO (modifyWorld ref (#oauthCodes %~ Map.insert codeHash code))
+    liftIO
+      ( atomicModifyIORef' ref \w ->
+          if authenticationValid w userId proofState createdAt
+            then (w & #oauthCodes %~ Map.insert codeHash code, Right ())
+            else (w, Left StaleAuthentication)
+      )
   ConsumeAuthorizationCode h t ->
     liftIO
       ( atomicModifyIORef' ref \w ->
@@ -1198,22 +1286,32 @@
 -- encryption boundary is PostgreSQL-only (Decision Log).
 runTotpCredentialStore :: (IOE :> es) => IORef World -> Eff (TotpCredentialStore : es) a -> Eff es a
 runTotpCredentialStore ref = interpret_ \case
-  UpsertTotpEnrollment NewTotpCredential {totpCredentialId, userId, secret, createdAt} -> do
+  UpsertTotpEnrollment proofState NewTotpCredential {totpCredentialId, userId, secret, createdAt} -> do
     let tc =
           TotpCredential
-            { totpCredentialId,
+            { authenticationGeneration = Just proofState.generation,
+              totpCredentialId,
               userId,
               secret,
               lastUsedCounter = Nothing,
               confirmedAt = Nothing,
               createdAt
             }
-    liftIO (modifyWorld ref (#totpCredentials %~ Map.insert userId tc))
-    pure tc
+    liftIO
+      ( atomicModifyIORef' ref \w ->
+          if authenticationValid w userId proofState createdAt
+            then (w & #totpCredentials %~ Map.insert userId tc, Right tc)
+            else (w, Left StaleAuthentication)
+      )
   FindTotpByUser uid ->
     liftIO ((Map.lookup uid . (.totpCredentials)) <$> readIORef ref)
-  ConfirmTotp tcid t ->
-    liftIO (modifyWorld ref (#totpCredentials %~ Map.map (\c -> if tcId c == tcid then c & #confirmedAt .~ Just t else c)))
+  ConfirmTotp uid proofState tcid t ->
+    liftIO
+      ( atomicModifyIORef' ref \w ->
+          if authenticationValid w uid proofState t
+            then (w & #totpCredentials %~ Map.map (\c -> if tcId c == tcid then c & #confirmedAt .~ Just t else c), Right ())
+            else (w, Left StaleAuthentication)
+      )
   SetTotpLastUsedCounter tcid c ->
     liftIO
       ( casWorld ref \w ->
@@ -1223,6 +1321,13 @@
                   Just (w & #totpCredentials %~ Map.insert uid (tc & #lastUsedCounter .~ Just c))
             _ -> Nothing
       )
+  RemoveTotpCredential uid proofState tcid ts ->
+    liftIO
+      ( atomicModifyIORef' ref \w ->
+          if authenticationValid w uid proofState ts
+            then (w & #totpCredentials %~ Map.filter (\tc -> tcId tc /= tcid || tc.userId /= uid), Right ())
+            else (w, Left StaleAuthentication)
+      )
   DeleteTotpByUser uid ->
     liftIO (modifyWorld ref (#totpCredentials %~ Map.delete uid))
 
@@ -1246,7 +1351,7 @@
 -- sees it unused. 'ReplaceRecoveryCodes' drops the user's whole set and inserts the new one.
 runRecoveryCodeStore :: (IOE :> es) => IORef World -> Eff (RecoveryCodeStore : es) a -> Eff es a
 runRecoveryCodeStore ref = interpret_ \case
-  ReplaceRecoveryCodes uid newCodes -> liftIO do
+  ReplaceRecoveryCodes uid proofState ts newCodes -> liftIO do
     let fresh =
           [ ( nc.recoveryCodeId,
               RecoveryCode
@@ -1259,9 +1364,10 @@
             )
           | nc <- newCodes
           ]
-    modifyWorld
-      ref
-      (#recoveryCodes %~ (\m -> Map.union (Map.fromList fresh) (Map.filter (\rc -> rcUserId rc /= uid) m)))
+    atomicModifyIORef' ref \w ->
+      if authenticationValid w uid proofState ts
+        then (w & #recoveryCodes %~ (\m -> Map.union (Map.fromList fresh) (Map.filter (\rc -> rcUserId rc /= uid) m)), Right ())
+        else (w, Left StaleAuthentication)
   ConsumeRecoveryCode uid h t ->
     liftIO
       ( casWorld ref \w ->
@@ -1570,3 +1676,9 @@
     . runCredentialStore ref
     . runRoleStore ref
     . runUserStore ref
+
+authenticationValid :: World -> UserId -> AuthenticationGuard -> UTCTime -> Bool
+authenticationValid w uid proofState ts =
+  maybe False (\u -> u.status == UserActive && u.authenticationGeneration == proofState.generation) (Map.lookup uid w.users)
+    && maybe True (\sid -> maybe False (\s -> s.userId == uid && s.status == SessionActive && s.expiresAt > ts) (Map.lookup sid w.sessions)) proofState.initiatingSession
+    && maybe True (\pid -> maybe False ((== uid) . pkUserId) (Map.lookup pid w.passkeys)) proofState.assertedPasskey
diff --git a/test/Shomei/Account/Admin/WorkflowSpec.hs b/test/Shomei/Account/Admin/WorkflowSpec.hs
--- a/test/Shomei/Account/Admin/WorkflowSpec.hs
+++ b/test/Shomei/Account/Admin/WorkflowSpec.hs
@@ -8,14 +8,17 @@
 import Control.Concurrent.Async (mapConcurrently)
 import Control.Monad (replicateM)
 import Data.IORef (IORef, newIORef, readIORef)
+import Data.Map.Strict qualified as Map
 import Data.Time (UTCTime (..), fromGregorian)
 import Effectful (Eff)
+import Shomei.Account.Admin.Recovery
 import Shomei.Account.Admin.Workflow (deleteUser, reinstateUser, revokeOneSession, revokeUserSessions, suspendUser)
 import Shomei.Account.Email.Domain (mkEmail)
 import Shomei.Account.LoginId.Domain (LoginId, mkLoginId)
+import Shomei.Account.Notification.Domain qualified as Notification
 import Shomei.Account.Password.Domain (PlainPassword (..))
 import Shomei.Account.User.Domain (User (..), UserStatus (..))
-import Shomei.Account.User.Store (findUserById)
+import Shomei.Account.User.Store (findUserById, markUserEmailVerified)
 import Shomei.Audit.Event.Domain qualified as Event
 import Shomei.Authorization.Claims.Domain (Audience (..), Issuer (..))
 import Shomei.Config (ShomeiConfig, defaultShomeiConfig)
@@ -28,6 +31,7 @@
 import Shomei.Session.LoginAttempt.Domain (AccountKey (..), ClientIp (..))
 import Shomei.Session.Store (listSessionsForUser)
 import Shomei.Test.InMemory (World (..), emptyWorld, runInMemory)
+import Shomei.Time.Store (now)
 import Test.Tasty (TestTree, testGroup)
 import Test.Tasty.HUnit (assertBool, assertFailure, testCase, (@?=))
 
@@ -35,7 +39,10 @@
 tests =
   testGroup
     "Shomei.Account.Admin.Workflow"
-    [ testSuspendFlipsStatusRevokesSessionsAndRecordsActor,
+    [ testRecoveryValidation,
+      testRecoveryStateAndNotification,
+      testRecoveryTargetStatus,
+      testSuspendFlipsStatusRevokesSessionsAndRecordsActor,
       testConcurrentSuspendsAuditOnce,
       testStrictTransitions,
       testDeleteIsTerminal,
@@ -234,3 +241,65 @@
   sum <$> traverse (either (assertFailure . show) pure) results >>= (@?= 1)
   events <- (.publishedEvents) <$> readIORef ref
   length [() | Event.SessionRevoked _ <- events] @?= 1
+
+testRecoveryValidation :: TestTree
+testRecoveryValidation = testCase "recovery rejects missing identity assertion and unbounded or unsafe labels before writes" $ withWorld \ref -> do
+  (user, _) <- runInMemory ref (signup cfg signupCmd) >>= either (assertFailure . show) pure
+  before <- readIORef ref
+  let invalid =
+        [ (LocalOperator "ops", RecoveryCommand False "INC-1"),
+          (LocalOperator "ops", RecoveryCommand True ""),
+          (LocalOperator "ops", RecoveryCommand True (mconcat (replicate 129 "x"))),
+          (LocalOperator "operator with spaces", RecoveryCommand True "INC-1"),
+          (LocalOperator "ops", RecoveryCommand True "secret\nidentity-evidence"),
+          (LocalOperator "ops", RecoveryCommand True "非ASCII")
+        ]
+  results <- mapM (\(actor, command) -> runInMemory ref (resetUserSecondFactors actor user.userId command)) invalid
+  results @?= replicate (length invalid) (Left InvalidInput)
+  after <- readIORef ref
+  after.users @?= before.users
+  after.sessions @?= before.sessions
+  after.publishedEvents @?= before.publishedEvents
+  after.sentNotifications @?= []
+
+testRecoveryStateAndNotification :: TestTree
+testRecoveryStateAndNotification = testCase "recovery preserves password/policy, invalidates sessions every time, and notifies only verified contacts" $ withWorld \ref -> do
+  (user, _) <- runInMemory ref (signup cfg signupCmd) >>= either (assertFailure . show) pure
+  before <- readIORef ref
+  first <- runInMemory ref (resetUserSecondFactors (LocalOperator "ops.console") user.userId (RecoveryCommand True "INC-1")) >>= either (assertFailure . show) pure
+  first.counts.sessionsRevoked @?= 1
+  first.verifiedNotificationDestination @?= False
+  after <- readIORef ref
+  after.credsByLoginId @?= before.credsByLoginId
+  after.sentNotifications @?= []
+  fmap (.authenticationGeneration) (Map.lookup user.userId after.users) @?= Just 1
+  runInMemory ref (now >>= markUserEmailVerified user.userId)
+  second <- runInMemory ref (resetUserSecondFactors (AuthenticatedAdministrator user.userId) user.userId (RecoveryCommand True "INC-2")) >>= either (assertFailure . show) pure
+  second.counts.sessionsRevoked @?= 0
+  second.verifiedNotificationDestination @?= True
+  final <- readIORef ref
+  case final.sentNotifications of
+    [Notification.SecondFactorsReset {email}] -> Just email @?= user.email
+    other -> assertFailure ("expected established contact notice, got " <> show other)
+  let resetEvents = [d | Event.UserSecondFactorsReset d <- final.publishedEvents]
+  length resetEvents @?= 2
+  map (.recoveryActor) resetEvents @?= [AuthenticatedAdministrator user.userId, LocalOperator "ops.console"]
+  loginResult <- runInMemory ref (login cfg ctx loginCmd)
+  case loginResult of
+    Right (LoginComplete _ _) -> pure ()
+    other -> assertFailure ("preserved password should work: " <> show other)
+
+testRecoveryTargetStatus :: TestTree
+testRecoveryTargetStatus = testCase "recovery refuses missing, suspended and deleted targets" $ withWorld \ref -> do
+  missing <- genUserId
+  absent <- runInMemory ref (resetUserSecondFactors (LocalOperator "ops") missing (RecoveryCommand True "INC-1"))
+  absent @?= Left UserNotFound
+  (user, _) <- runInMemory ref (signup cfg signupCmd) >>= either (assertFailure . show) pure
+  _ <- runInMemory ref (suspendUser missing user.userId)
+  suspended <- runInMemory ref (resetUserSecondFactors (LocalOperator "ops") user.userId (RecoveryCommand True "INC-1"))
+  suspended @?= Left InvalidUserStatus
+  _ <- runInMemory ref (deleteUser missing user.userId)
+  deleted <- runInMemory ref (resetUserSecondFactors (LocalOperator "ops") user.userId (RecoveryCommand True "INC-1"))
+  deleted @?= Left InvalidUserStatus
+  world <- readIORef ref
+  length [() | Event.UserSecondFactorsReset _ <- world.publishedEvents] @?= 0
diff --git a/test/Shomei/Account/Verification/WorkflowSpec.hs b/test/Shomei/Account/Verification/WorkflowSpec.hs
--- a/test/Shomei/Account/Verification/WorkflowSpec.hs
+++ b/test/Shomei/Account/Verification/WorkflowSpec.hs
@@ -34,6 +34,7 @@
     WebAuthnCredentialId (..),
   )
 import Shomei.Passkey.Store (createPasskey)
+import Shomei.Session.Authentication.Guard (AuthenticationGuard (..))
 import Shomei.Session.Authentication.Workflow (login, refresh, signup)
 import Shomei.Session.Command (ClientContext (..), LoginCommand (..), ProofContext (..), RefreshCommand (..), SignupCommand (..))
 import Shomei.Session.LoginAttempt.Domain (AccountKey (..), ClientIp (..))
@@ -119,6 +120,7 @@
     runInMemory
       ref
       ( createPasskey
+          (AuthenticationGuard 0 Nothing Nothing)
           20
           NewPasskeyCredential
             { userId = uid,
diff --git a/test/Shomei/Audit/Event/CodecSpec.hs b/test/Shomei/Audit/Event/CodecSpec.hs
--- a/test/Shomei/Audit/Event/CodecSpec.hs
+++ b/test/Shomei/Audit/Event/CodecSpec.hs
@@ -5,8 +5,7 @@
 -- against the @event_type@/payload mapping drifting from the writer.
 --
 -- If a new 'AuthEvent' constructor is added, add a case here (and the @event_type@ string is
--- exercised by the writer's mapping). The @allEventTypes@ count assertion catches a missing
--- constructor cheaply.
+-- exercised by the writer's mapping). The vocabulary assertion checks these fixtures too.
 module Shomei.Audit.Event.CodecSpec (tests) where
 
 import Data.Aeson (ToJSON, toJSON)
@@ -16,9 +15,10 @@
 import Data.Text qualified as Text
 import Data.Time (UTCTime (..), fromGregorian, secondsToDiffTime)
 import Data.UUID qualified as UUID
+import Shomei.Account.Admin.Recovery.Domain
 import Shomei.Account.Email.Domain (Email, emailText, mkEmail)
 import Shomei.Account.LoginId.Domain (LoginId, mkLoginId)
-import Shomei.Audit.Event.Codec (reconstructAuthEvent)
+import Shomei.Audit.Event.Codec (knownAuthEventTypes, projectAuthEvent, reconstructAuthEvent)
 import Shomei.Audit.Event.Domain
 import Shomei.Authorization.Claims.Domain (Role (..), Scope (..))
 import Shomei.Config (ServiceAccountId (..))
@@ -73,9 +73,14 @@
 aliceLogin = either (error . show) id (mkLoginId (emailText aliceEmail))
 
 -- | Assert that the event survives @project → toJSON → reconstruct@.
-check :: (ToJSON a) => Text -> a -> AuthEvent -> TestTree
+check :: (ToJSON a) => Text -> a -> AuthEvent -> (Text, TestTree)
 check ty dataRecord expected =
-  testCase (Text.unpack ty) (reconstructAuthEvent ty (toJSON dataRecord) @?= Right expected)
+  ( ty,
+    testCase (Text.unpack ty) do
+      reconstructAuthEvent ty (toJSON dataRecord) @?= Right expected
+      let (_, _, projected, _, _) = projectAuthEvent expected
+      projected @?= ty
+  )
 
 -- Tests ----------------------------------------------------------------------
 
@@ -83,7 +88,7 @@
 tests =
   testGroup
     "Shomei.Audit.Event.Codec"
-    [ testGroup "round-trips every constructor" roundTrips,
+    [ testGroup "round-trips every constructor" (map snd roundTrips),
       testUnknownType,
       testConstructorCount,
       testOldLoginFailedDecodes,
@@ -93,7 +98,7 @@
 
 -- | One assertion per 'AuthEvent' constructor. The @event_type@ strings here MUST match
 -- 'Shomei.Audit.Publisher.Postgres.projectAuthEvent' verbatim.
-roundTrips :: [TestTree]
+roundTrips :: [(Text, TestTree)]
 roundTrips =
   [ let d = UserRegisteredData uid aliceLogin (Just aliceEmail) t0 in check "user_registered" d (UserRegistered d),
     let d = LoginSucceededData uid sid t0 in check "login_succeeded" d (LoginSucceeded d),
@@ -110,6 +115,7 @@
     let d = PasswordChangeFailedData uid t0 in check "password_change_failed" d (PasswordChangeFailed d),
     let d = UserSuspendedData uid (Just uid2) t0 in check "user_suspended" d (UserSuspended d),
     let d = UserDeletedData uid (Just uid2) t0 in check "user_deleted" d (UserDeleted d),
+    let d = UserSecondFactorsResetData uid (LocalOperator "ops") "INC-1" (RecoveryCounts 1 1 10 1 1 1 0 0) t0 in check "user_second_factors_reset" d (UserSecondFactorsReset d),
     let d = UserReinstatedData uid (Just uid2) t0 in check "user_reinstated" d (UserReinstated d),
     let d = AccountLockedData (AccountKey "k-abc") (ClientIp "1.2.3.4") 5 t1 t0 in check "account_locked" d (AccountLocked d),
     let d = LoginThrottledData (ClientIp "1.2.3.4") 5 t0 in check "login_throttled" d (LoginThrottled d),
@@ -165,10 +171,11 @@
       Left _ -> pure ()
       Right _ -> error "expected Left for unknown event_type"
 
--- | Guard: the round-trip list must cover every 'AuthEvent' constructor (currently 42).
+-- | The public vocabulary is unique and exactly matches the constructor fixtures.
 testConstructorCount :: TestTree
-testConstructorCount =
-  testCase "covers all 42 AuthEvent constructors" (length roundTrips @?= 42)
+testConstructorCount = testCase "known vocabulary matches every constructor fixture" do
+  length knownAuthEventTypes @?= Set.size (Set.fromList knownAuthEventTypes)
+  Set.fromList knownAuthEventTypes @?= Set.fromList (map fst roundTrips)
 
 -- | Historical rows contained the submitted login identifier verbatim. The new optional fields
 -- deliberately make those rows readable without reproducing that identifier in the typed event.
diff --git a/test/Shomei/Mfa/Totp/StoreSpec.hs b/test/Shomei/Mfa/Totp/StoreSpec.hs
--- a/test/Shomei/Mfa/Totp/StoreSpec.hs
+++ b/test/Shomei/Mfa/Totp/StoreSpec.hs
@@ -11,7 +11,12 @@
 import Data.Int (Int64)
 import Data.Maybe (isJust)
 import Data.Time (UTCTime (..), fromGregorian)
+import Effectful (Eff, IOE, (:>))
+import Shomei.Account.LoginId.Domain (mkLoginId)
+import Shomei.Account.User.Domain (NewUser (..), User (..))
+import Shomei.Account.User.Store (UserStore, createUser)
 import Shomei.Id (genRecoveryCodeId, genTotpCredentialId, genUserId)
+import Shomei.Id qualified as Id
 import Shomei.Mfa.RecoveryCode.Store
   ( consumeRecoveryCode,
     countUnusedRecoveryCodes,
@@ -26,6 +31,7 @@
     setTotpLastUsedCounter,
     upsertTotpEnrollment,
   )
+import Shomei.Session.Authentication.Guard (AuthenticationGuard (..))
 import Shomei.Test.InMemory (World, emptyWorld, runInMemory)
 import Test.Tasty (TestTree, testGroup)
 import Test.Tasty.HUnit (testCase, (@?=))
@@ -61,11 +67,11 @@
 totpRoundTrip = do
   ref <- newWorld
   (created, found0, advanced, replayed, older, found1, found2) <- runInMemory ref do
-    u <- genUserId
+    u <- newUserId
     tcid <- genTotpCredentialId
-    created <- upsertTotpEnrollment NewTotpCredential {totpCredentialId = tcid, userId = u, secret = rawSecret, createdAt = t0}
+    created <- either (error . show) pure =<< upsertTotpEnrollment (AuthenticationGuard 0 Nothing Nothing) NewTotpCredential {totpCredentialId = tcid, userId = u, secret = rawSecret, createdAt = t0}
     found0 <- findTotpByUser u
-    confirmTotp tcid t0
+    confirmTotp u (AuthenticationGuard 0 Nothing Nothing) tcid t0
     advanced <- setTotpLastUsedCounter tcid 42
     replayed <- setTotpLastUsedCounter tcid 42
     older <- setTotpLastUsedCounter tcid 41
@@ -84,11 +90,11 @@
 totpReenrollReplaces = do
   ref <- newWorld
   (found, secondId) <- runInMemory ref do
-    u <- genUserId
+    u <- newUserId
     tcid1 <- genTotpCredentialId
-    _ <- upsertTotpEnrollment NewTotpCredential {totpCredentialId = tcid1, userId = u, secret = rawSecret, createdAt = t0}
+    _ <- either (error . show) pure =<< upsertTotpEnrollment (AuthenticationGuard 0 Nothing Nothing) NewTotpCredential {totpCredentialId = tcid1, userId = u, secret = rawSecret, createdAt = t0}
     tcid2 <- genTotpCredentialId
-    second <- upsertTotpEnrollment NewTotpCredential {totpCredentialId = tcid2, userId = u, secret = TotpSecret "09876543210987654321", createdAt = t0}
+    second <- either (error . show) pure =<< upsertTotpEnrollment (AuthenticationGuard 0 Nothing Nothing) NewTotpCredential {totpCredentialId = tcid2, userId = u, secret = TotpSecret "09876543210987654321", createdAt = t0}
     found <- findTotpByUser u
     pure (found, second.totpCredentialId)
   -- Only one credential per user: the re-enrollment's id is what a lookup now returns.
@@ -98,16 +104,16 @@
 recoveryCas = do
   ref <- newWorld
   (countBefore, firstConsume, secondConsume, countAfter, countAfterReplace, oldConsume) <- runInMemory ref do
-    u <- genUserId
+    u <- newUserId
     ids <- mapM (const genRecoveryCodeId) [1 :: Int, 2, 3]
     let mk i h = NewRecoveryCode {recoveryCodeId = i, codeHash = h, createdAt = t0}
-    replaceRecoveryCodes u (zipWith mk ids ["h1", "h2", "h3"])
+    replaceRecoveryCodes u (AuthenticationGuard 0 Nothing Nothing) t0 (zipWith mk ids ["h1", "h2", "h3"])
     countBefore <- countUnusedRecoveryCodes u
     firstConsume <- consumeRecoveryCode u "h1" t0
     secondConsume <- consumeRecoveryCode u "h1" t0
     countAfter <- countUnusedRecoveryCodes u
     ids2 <- mapM (const genRecoveryCodeId) [1 :: Int, 2]
-    replaceRecoveryCodes u (zipWith mk ids2 ["n1", "n2"])
+    replaceRecoveryCodes u (AuthenticationGuard 0 Nothing Nothing) t0 (zipWith mk ids2 ["n1", "n2"])
     countAfterReplace <- countUnusedRecoveryCodes u
     oldConsume <- consumeRecoveryCode u "h2" t0
     pure (countBefore, firstConsume, secondConsume, countAfter, countAfterReplace, oldConsume)
@@ -117,3 +123,11 @@
   countAfter @?= 2
   countAfterReplace @?= 2
   oldConsume @?= False
+
+-- Store fixtures use real users so user-row serialization has the same preconditions as SQL.
+newUserId :: (UserStore :> es, IOE :> es) => Eff es Id.UserId
+newUserId = do
+  unique <- genUserId
+  let lid = either (error . show) id (mkLoginId (Id.idText unique))
+  user <- createUser (NewUser lid Nothing Nothing)
+  pure user.userId
diff --git a/test/Shomei/Mfa/WorkflowSpec.hs b/test/Shomei/Mfa/WorkflowSpec.hs
--- a/test/Shomei/Mfa/WorkflowSpec.hs
+++ b/test/Shomei/Mfa/WorkflowSpec.hs
@@ -38,6 +38,7 @@
     WebAuthnCredentialId (..),
   )
 import Shomei.Passkey.Store (createPasskey)
+import Shomei.Session.Authentication.Guard (AuthenticationGuard (..))
 import Shomei.Session.Authentication.Workflow (LoginResult (..), MfaChallenge (..), login, signup)
 import Shomei.Session.Command (ClientContext (..), LoginCommand (..), ProofContext (..), SignupCommand (..))
 import Shomei.Session.LoginAttempt.Domain (AccountKey (..), AccountLockout (..), ClientIp (..))
@@ -93,6 +94,7 @@
     runInMemory
       ref
       ( createPasskey
+          (AuthenticationGuard 0 Nothing Nothing)
           20
           NewPasskeyCredential
             { userId = uid,
@@ -243,12 +245,12 @@
       correct = totpCode 6 secret (totpCounter fixedTime)
       wrong = if correct == "000000" then "999999" else "000000"
   runInMemory ref do
-    _ <- upsertTotpEnrollment NewTotpCredential {totpCredentialId = tcid, userId = user.userId, secret, createdAt = fixedTime}
-    confirmTotp tcid fixedTime
+    _ <- either (error . show) pure =<< upsertTotpEnrollment (AuthenticationGuard 0 Nothing Nothing) NewTotpCredential {totpCredentialId = tcid, userId = user.userId, secret, createdAt = fixedTime}
+    confirmTotp user.userId (AuthenticationGuard 0 Nothing Nothing) tcid fixedTime
   replicateM_ 5 do
-    result <- runInMemory ref (removeTotp cfg proofContext user (RemoveWithCode wrong))
+    result <- runInMemory ref (removeTotp cfg proofContext user Nothing (RemoveWithCode wrong))
     result @?= Left TotpCodeInvalid
-  lockedResult <- runInMemory ref (removeTotp cfg proofContext user (RemoveWithCode correct))
+  lockedResult <- runInMemory ref (removeTotp cfg proofContext user Nothing (RemoveWithCode correct))
   lockedResult @?= Left TotpCodeInvalid
   remaining <- runInMemory ref (findTotpByUser user.userId)
   assertBool "the locked removal leaves the TOTP credential intact" (isJust remaining)
diff --git a/test/Shomei/OAuth/Authorize/WorkflowSpec.hs b/test/Shomei/OAuth/Authorize/WorkflowSpec.hs
--- a/test/Shomei/OAuth/Authorize/WorkflowSpec.hs
+++ b/test/Shomei/OAuth/Authorize/WorkflowSpec.hs
@@ -7,6 +7,9 @@
 import Data.Set qualified as Set
 import Data.Text (Text)
 import Data.Time (UTCTime (..), addUTCTime, fromGregorian)
+import Shomei.Account.LoginId.Domain (mkLoginId)
+import Shomei.Account.User.Domain (NewUser (..), User (..))
+import Shomei.Account.User.Store (createUser)
 import Shomei.Authorization.Claims.Domain (Audience (..), AuthClaims (..), Issuer (..), Scope (..))
 import Shomei.Config (ShomeiConfig, defaultShomeiConfig)
 import Shomei.Id (SessionId, UserId, genOAuthClientId, genSessionId, genUserId, idText)
@@ -88,7 +91,8 @@
 runAuthorizeWithActor kind state storedActor claimActor = do
   ref <- newIORef (emptyWorld fixedTime)
   result <- runInMemory ref do
-    uid <- genUserId
+    user <- createUser (NewUser (either (error . show) id (mkLoginId "authorize-fixture")) Nothing Nothing)
+    let uid = user.userId
     actor <- if storedActor then Just <$> genUserId else pure Nothing
     session <-
       createSession
diff --git a/test/Shomei/OAuth/TokenGrant/WorkflowSpec.hs b/test/Shomei/OAuth/TokenGrant/WorkflowSpec.hs
--- a/test/Shomei/OAuth/TokenGrant/WorkflowSpec.hs
+++ b/test/Shomei/OAuth/TokenGrant/WorkflowSpec.hs
@@ -30,6 +30,7 @@
     pkceChallengeFor,
   )
 import Shomei.ServiceAccount.Secret (sha256Hex)
+import Shomei.Session.Authentication.Guard (AuthenticationGuard (..))
 import Shomei.Session.Authentication.Workflow (signup)
 import Shomei.Session.Command (SignupCommand (..))
 import Shomei.Session.Token.Bearer (parseBearer)
@@ -109,6 +110,7 @@
             createdAt = fixedTime
           }
     putAuthorizationCode
+      (AuthenticationGuard 0 Nothing Nothing)
       NewAuthorizationCode
         { codeHash = sha256Hex rawCode,
           clientId = client.clientId,
diff --git a/test/Shomei/OAuthCodeStoreSpec.hs b/test/Shomei/OAuthCodeStoreSpec.hs
--- a/test/Shomei/OAuthCodeStoreSpec.hs
+++ b/test/Shomei/OAuthCodeStoreSpec.hs
@@ -21,10 +21,15 @@
 import Data.Text (Text)
 import Data.Text qualified as Text
 import Data.Time (UTCTime (..), addUTCTime, fromGregorian)
+import Effectful (Eff, IOE, (:>))
+import Shomei.Account.LoginId.Domain (mkLoginId)
+import Shomei.Account.User.Domain (NewUser (..), User (..))
+import Shomei.Account.User.Store (UserStore, createUser)
 import Shomei.Audit.Event.Domain qualified as Event
 import Shomei.Authorization.Claims.Domain (Audience (..), AuthClaims (..), Issuer (..), Scope (..))
 import Shomei.Config (ShomeiConfig, defaultShomeiConfig)
 import Shomei.Id (SessionId, UserId, genOAuthClientId, genSessionId, genUserId, idText)
+import Shomei.Id qualified as Id
 import Shomei.OAuth.AuthorizationCode.Domain (AuthorizationCode (..), NewAuthorizationCode (..))
 import Shomei.OAuth.AuthorizationCode.Store
   ( bindAuthorizationCodeSession,
@@ -42,6 +47,7 @@
 import Shomei.OAuth.Client.Domain (ClientType (..), NewOAuthClient (..), OAuthClient (..))
 import Shomei.OAuth.Client.Store (createOAuthClient)
 import Shomei.ServiceAccount.Secret (sha256Hex)
+import Shomei.Session.Authentication.Guard (AuthenticationGuard (..))
 import Shomei.Session.Domain (NewSession (..), Session (..), SessionKind (InteractiveSession))
 import Shomei.Session.Store (createSession)
 import Shomei.Test.InMemory (World (..), emptyWorld, runInMemory)
@@ -159,8 +165,8 @@
 consumeOnce = do
   ref <- newWorld
   (first', second') <- runInMemory ref do
-    uid <- genUserId
-    putAuthorizationCode (newCode uid (addUTCTime 60 t0) "hash-1")
+    uid <- newUserId
+    putAuthorizationCode (AuthenticationGuard 0 Nothing Nothing) (newCode uid (addUTCTime 60 t0) "hash-1")
     a <- consumeAuthorizationCode "hash-1" t0
     b <- consumeAuthorizationCode "hash-1" t0
     pure (a, b)
@@ -172,9 +178,9 @@
 bindAndFindConsumed = do
   ref <- newWorld
   (sid, found, expired) <- runInMemory ref do
-    uid <- genUserId
+    uid <- newUserId
     sid <- genSessionId
-    putAuthorizationCode (newCode uid (addUTCTime 60 t0) "hash-bound")
+    putAuthorizationCode (AuthenticationGuard 0 Nothing Nothing) (newCode uid (addUTCTime 60 t0) "hash-bound")
     _ <- consumeAuthorizationCode "hash-bound" t0
     bindAuthorizationCodeSession "hash-bound" sid
     found <- findConsumedAuthorizationCode "hash-bound" t0
@@ -187,8 +193,8 @@
 expiredNeverConsumes = do
   ref <- newWorld
   result <- runInMemory ref do
-    uid <- genUserId
-    putAuthorizationCode (newCode uid (addUTCTime 60 t0) "hash-1")
+    uid <- newUserId
+    putAuthorizationCode (AuthenticationGuard 0 Nothing Nothing) (newCode uid (addUTCTime 60 t0) "hash-1")
     -- One second past the expiry.
     consumeAuthorizationCode "hash-1" (addUTCTime 61 t0)
   assertBool "an expired code must not consume" (isNothing result)
@@ -209,7 +215,7 @@
 runAuthorizeWithAllowed registeredScopes clientType params = do
   ref <- newWorld
   result <- runInMemory ref do
-    uid <- genUserId
+    uid <- newUserId
     session <-
       createSession
         NewSession
@@ -378,3 +384,11 @@
   assertBool "'/' is not base64url" (not (isValidS256Challenge (Text.replicate 42 "a" <> "/")))
   assertBool "'=' padding is not accepted" (not (isValidS256Challenge (Text.replicate 42 "a" <> "=")))
   assertBool "'-' and '_' are base64url" (isValidS256Challenge (Text.replicate 41 "a" <> "-_"))
+
+-- Store fixtures use real users so user-row serialization has the same preconditions as SQL.
+newUserId :: (UserStore :> es, IOE :> es) => Eff es Id.UserId
+newUserId = do
+  unique <- genUserId
+  let lid = either (error . show) id (mkLoginId (Id.idText unique))
+  user <- createUser (NewUser lid Nothing Nothing)
+  pure user.userId
diff --git a/test/Shomei/Passkey/WorkflowSpec.hs b/test/Shomei/Passkey/WorkflowSpec.hs
--- a/test/Shomei/Passkey/WorkflowSpec.hs
+++ b/test/Shomei/Passkey/WorkflowSpec.hs
@@ -114,7 +114,7 @@
 enrollListRemove = do
   ref <- newWorld
   uid <- seedUser ref
-  (cid, opts) <- mustRight =<< runInMemory ref (beginPasskeyRegistration cfg uid)
+  (cid, opts) <- mustRight =<< runInMemory ref (beginPasskeyRegistration cfg uid Nothing)
   pk <- mustRight =<< runInMemory ref (completePasskeyRegistration cfg uid cid (credentialJson (challengeOf opts)) (Just "YubiKey"))
   pkLabel pk @?= Just "YubiKey"
   -- list returns exactly the enrolled passkey
@@ -130,7 +130,7 @@
   ref <- newWorld
   uid <- seedUser ref
   otherUid <- genUserId
-  (cid, opts) <- mustRight =<< runInMemory ref (beginPasskeyRegistration cfg uid)
+  (cid, opts) <- mustRight =<< runInMemory ref (beginPasskeyRegistration cfg uid Nothing)
   result <- runInMemory ref (completePasskeyRegistration cfg otherUid cid (credentialJson (challengeOf opts)) Nothing)
   result @?= Left PendingCeremonyNotFound
 
@@ -146,7 +146,7 @@
 consumedCeremony = do
   ref <- newWorld
   uid <- seedUser ref
-  (cid, opts) <- mustRight =<< runInMemory ref (beginPasskeyRegistration cfg uid)
+  (cid, opts) <- mustRight =<< runInMemory ref (beginPasskeyRegistration cfg uid Nothing)
   _ <- mustRight =<< runInMemory ref (completePasskeyRegistration cfg uid cid (credentialJson (challengeOf opts)) Nothing)
   -- the ceremony was consumed by the first complete; a second is rejected
   again <- runInMemory ref (completePasskeyRegistration cfg uid cid (credentialJson (challengeOf opts)) Nothing)
@@ -156,7 +156,7 @@
 rejectedCredential = do
   ref <- newWorld
   uid <- seedUser ref
-  (cid, _opts) <- mustRight =<< runInMemory ref (beginPasskeyRegistration cfg uid)
+  (cid, _opts) <- mustRight =<< runInMemory ref (beginPasskeyRegistration cfg uid Nothing)
   -- a credential whose challenge does not match the ceremony fails verification
   result <- runInMemory ref (completePasskeyRegistration cfg uid cid (credentialJson "not-the-challenge") Nothing)
   result @?= Left (WebAuthnCeremonyError WebAuthnChallengeMismatch)
@@ -166,7 +166,7 @@
   ref <- newWorld
   uid <- seedUser ref
   let limited = cfg {maxPasskeysPerUser = 1}
-  ceremonies <- forM [1 .. 2 :: Int] \_ -> mustRight =<< runInMemory ref (beginPasskeyRegistration limited uid)
+  ceremonies <- forM [1 .. 2 :: Int] \_ -> mustRight =<< runInMemory ref (beginPasskeyRegistration limited uid Nothing)
   gate <- newEmptyMVar
   results <- forM ceremonies \(cid, opts) -> do
     done <- newEmptyMVar
@@ -191,7 +191,7 @@
 labelBoundary = do
   ref <- newWorld
   uid <- seedUser ref
-  (cid, opts) <- mustRight =<< runInMemory ref (beginPasskeyRegistration cfg uid)
+  (cid, opts) <- mustRight =<< runInMemory ref (beginPasskeyRegistration cfg uid Nothing)
   let credential = credentialJson (challengeOf opts)
   bad <- runInMemory ref (completePasskeyRegistration cfg uid cid credential (Just (Text.replicate 129 "🔑")))
   bad @?= Left InvalidInput
diff --git a/test/Shomei/PasskeyStoreSpec.hs b/test/Shomei/PasskeyStoreSpec.hs
--- a/test/Shomei/PasskeyStoreSpec.hs
+++ b/test/Shomei/PasskeyStoreSpec.hs
@@ -17,7 +17,12 @@
 import Data.Maybe (isNothing)
 import Data.Text (Text)
 import Data.Time (UTCTime (..), addUTCTime, fromGregorian)
+import Effectful (Eff, IOE, (:>))
+import Shomei.Account.LoginId.Domain (mkLoginId)
+import Shomei.Account.User.Domain (NewUser (..), User (..))
+import Shomei.Account.User.Store (UserStore, createUser)
 import Shomei.Id (CeremonyId, PasskeyId, UserId, genCeremonyId, genUserId)
+import Shomei.Id qualified as Id
 import Shomei.Passkey.Ceremony.Store (putPendingCeremony, takePendingCeremony)
 import Shomei.Passkey.Domain
   ( CeremonyKind (..),
@@ -38,6 +43,7 @@
     findPasskeysByUserHandle,
     updatePasskeySignCounter,
   )
+import Shomei.Session.Authentication.Guard (AuthenticationGuard (..))
 import Shomei.Test.InMemory (World, emptyWorld, runInMemory)
 import Test.Tasty (TestTree, testGroup)
 import Test.Tasty.HUnit (assertBool, testCase, (@?=))
@@ -123,9 +129,9 @@
 createAndFind :: IO ()
 createAndFind = do
   ref <- newWorld
-  uid <- genUserId
+  uid <- runInMemory ref newUserId
   (created, byUser, byCred, byHandle) <- runInMemory ref do
-    created <- either (error . show) pure =<< createPasskey 20 (sampleNew uid)
+    created <- either (error . show) pure =<< createPasskey (AuthenticationGuard 0 Nothing Nothing) 20 (sampleNew uid)
     byUser <- findPasskeysByUser uid
     byCred <- findPasskeyByCredentialId (WebAuthnCredentialId cid1)
     byHandle <- findPasskeysByUserHandle (UserHandle uh1)
@@ -144,9 +150,9 @@
 updateSignCounter :: IO ()
 updateSignCounter = do
   ref <- newWorld
-  uid <- genUserId
+  uid <- runInMemory ref newUserId
   (advanced, replayed, older, found) <- runInMemory ref do
-    created <- either (error . show) pure =<< createPasskey 20 (sampleNew uid)
+    created <- either (error . show) pure =<< createPasskey (AuthenticationGuard 0 Nothing Nothing) 20 (sampleNew uid)
     advanced <- updatePasskeySignCounter (pkPasskeyId created) (SignatureCounter 7) t1
     replayed <- updatePasskeySignCounter (pkPasskeyId created) (SignatureCounter 7) t1
     older <- updatePasskeySignCounter (pkPasskeyId created) (SignatureCounter 6) t1
@@ -159,24 +165,24 @@
 countByUser :: IO ()
 countByUser = do
   ref <- newWorld
-  uid <- genUserId
-  otherUid <- genUserId
+  uid <- runInMemory ref newUserId
+  otherUid <- runInMemory ref newUserId
   n <- runInMemory ref do
-    _ <- createPasskey 20 (sampleNew uid)
+    _ <- createPasskey (AuthenticationGuard 0 Nothing Nothing) 20 (sampleNew uid)
     -- a second passkey for the same user (distinct credential id)
-    _ <- createPasskey 20 (sampleNewWithCred uid "cred-2")
+    _ <- createPasskey (AuthenticationGuard 0 Nothing Nothing) 20 (sampleNewWithCred uid "cred-2")
     -- a third for a different user
-    _ <- createPasskey 20 (sampleNewWithCred otherUid "cred-3")
+    _ <- createPasskey (AuthenticationGuard 0 Nothing Nothing) 20 (sampleNewWithCred otherUid "cred-3")
     countPasskeysByUser uid
   n @?= 2
 
 userScopedDelete :: IO ()
 userScopedDelete = do
   ref <- newWorld
-  uid <- genUserId
-  otherUid <- genUserId
+  uid <- runInMemory ref newUserId
+  otherUid <- runInMemory ref newUserId
   (afterWrongUser, afterOwner) <- runInMemory ref do
-    created <- either (error . show) pure =<< createPasskey 20 (sampleNew uid)
+    created <- either (error . show) pure =<< createPasskey (AuthenticationGuard 0 Nothing Nothing) 20 (sampleNew uid)
     let pid = pkPasskeyId created
     deletePasskey otherUid pid -- wrong user: no-op
     afterWrongUser <- findPasskeyByCredentialId (WebAuthnCredentialId cid1)
@@ -189,7 +195,9 @@
 samplePending :: CeremonyId -> UTCTime -> PendingCeremony
 samplePending cid expiry =
   PendingCeremony
-    { ceremonyId = cid,
+    { authenticationGeneration = Just 0,
+      initiatingSession = Nothing,
+      ceremonyId = cid,
       userId = Nothing,
       kind = RegistrationCeremony,
       optionsBlob = "{\"challenge\":\"abc\"}",
@@ -221,3 +229,11 @@
     pure (firstTake, afterTake)
   assertBool "expired take returns Nothing" (isNothing firstTake)
   assertBool "subsequent take also Nothing" (isNothing afterTake)
+
+-- Store fixtures use real users so user-row serialization has the same preconditions as SQL.
+newUserId :: (UserStore :> es, IOE :> es) => Eff es Id.UserId
+newUserId = do
+  unique <- genUserId
+  let lid = either (error . show) id (mkLoginId (Id.idText unique))
+  user <- createUser (NewUser lid Nothing Nothing)
+  pure user.userId
diff --git a/test/Shomei/Session/Authentication/ConcurrencySpec.hs b/test/Shomei/Session/Authentication/ConcurrencySpec.hs
--- a/test/Shomei/Session/Authentication/ConcurrencySpec.hs
+++ b/test/Shomei/Session/Authentication/ConcurrencySpec.hs
@@ -23,6 +23,7 @@
 import Effectful (Eff, IOE, liftIO, (:>))
 import Effectful.Dispatch.Dynamic (interpose, passthrough)
 import Shomei.Account.Email.Domain (Email, emailText, mkEmail)
+import Shomei.Session.Authentication.Guard (AuthenticationGuard (..))
 
 -- Qualified: several 'AuthError' constructors share names with 'SessionStatus' constructors.
 
@@ -247,14 +248,16 @@
       tcid <- genTotpCredentialId
       runInMemory ref do
         _ <-
-          upsertTotpEnrollment
-            NewTotpCredential
-              { totpCredentialId = tcid,
-                userId = user.userId,
-                secret,
-                createdAt = fixedTime
-              }
-        confirmTotp tcid fixedTime
+          either (error . show) pure
+            =<< upsertTotpEnrollment
+              (AuthenticationGuard 0 Nothing Nothing)
+              NewTotpCredential
+                { totpCredentialId = tcid,
+                  userId = user.userId,
+                  secret,
+                  createdAt = fixedTime
+                }
+        confirmTotp user.userId (AuthenticationGuard 0 Nothing Nothing) tcid fixedTime
 
       ceremonies <- replicateM racers (loginExpectingTotpChallenge ref)
       let code = totpCode 6 secret (totpCounter fixedTime)
diff --git a/test/Shomei/Session/Authentication/WorkflowSpec.hs b/test/Shomei/Session/Authentication/WorkflowSpec.hs
--- a/test/Shomei/Session/Authentication/WorkflowSpec.hs
+++ b/test/Shomei/Session/Authentication/WorkflowSpec.hs
@@ -214,18 +214,20 @@
   (user, _) <- expectRight =<< runInMemory ref (signup cfg (signupEmail aliceEmail strongPw Nothing))
   let granted = Set.fromList [Scope "openid", Scope "kawa:read"]
   (_, oauthPair, _) <-
-    runInMemory
-      ref
-      ( issueSessionWith
-          cfg
-          SessionOptions
-            { oauthClientId = Just "oauthclient_test",
-              extraScopes = granted,
-              remember = False
-            }
-          user
-          fixedTime
-      )
+    expectRight
+      =<< runInMemory
+        ref
+        ( issueSessionWith
+            cfg
+            SessionOptions
+              { oauthClientId = Just "oauthclient_test",
+                extraScopes = granted,
+                remember = False,
+                authenticationGuard = Nothing
+              }
+            user
+            fixedTime
+        )
   result <- runInMemory ref (refresh cfg (RefreshCommand oauthPair.refreshToken))
   result @?= Left Err.RefreshTokenInvalid
   wrongClient <- runInMemory ref (refreshFrom (OAuthClientRefresh "oauthclient_other") cfg (RefreshCommand oauthPair.refreshToken))
