Foodtruck Order — TypeScript Reference - v0.1.0
    Preparing search index...

    Persistence boundary for the complete password-recovery credential lifecycle.

    interface PasswordRecoveryRepository {
        findEnabledAccount(email: string): Promise<RecoveryAccount | null>;
        invalidate(tokenDigest: string): Promise<void>;
        issue(
            account: RecoveryAccount,
            tokenDigest: string,
            createdAt: Date,
            expiresAt: Date,
        ): Promise<boolean>;
        resetPassword(
            tokenDigest: string,
            newPasswordHash: string,
            now: Date,
        ): Promise<boolean>;
    }
    Index
    • Atomically consume a valid token, replace the hash, and revoke all sessions/tokens.

      Parameters

      • tokenDigest: string
      • newPasswordHash: string
      • now: Date

      Returns Promise<boolean>