Skip to content

Open-source document signature platform. Not affiliated with DocuSign.

TypeScript

Make Part 11 signatures in the name an administrator confirmed

Claude962cdb9a38c0
diff --git a/db/migrations/20261120100000_identity_verified_snapshot.sql b/db/migrations/20261120100000_identity_verified_snapshot.sql
new file mode 100644
index 0000000..dceb4b8
--- /dev/null
+++ b/db/migrations/20261120100000_identity_verified_snapshot.sql
@@ -0,0 +1,17 @@
+-- Part 11: the name and email address an administrator confirmed, kept
+-- with the confirmation. The confirmation counts only while the account
+-- still has that name and address, so changing either one (in the profile,
+-- or through the email change flow) needs an administrator to confirm the
+-- person again before they can sign.
+
+alter table public."user"
+ add column if not exists identity_verified_name text,
+ add column if not exists identity_verified_email text;
+
+-- Confirmations made before this change were of the account as it is now.
+update public."user"
+set
+ identity_verified_name = name,
+ identity_verified_email = email
+where identity_verified_at is not null
+ and identity_verified_name is null;
diff --git a/docs/part11/procedures.md b/docs/part11/procedures.md
index 09db5cf..e66a80b 100644
--- a/docs/part11/procedures.md
+++ b/docs/part11/procedures.md
@@ -6,7 +6,7 @@ Short templates for the procedures Part 11 expects you to have. Put each into yo
1. Only people who sign or send regulated records get an account. Each account is for one person and is never reassigned or reused, even after the person leaves.
2. Before confirming an identity, the administrator checks it with `[a government photo ID in person / your HR record / …]`.
-3. The administrator confirms the identity in Settings, People, Confirm identity. The note says how the check was done and gives a reference, such as "Passport seen in person, HR record 4417". The note must not contain the ID number itself.
+3. The administrator confirms the identity in Settings, People, Confirm identity. The note says how the check was done and gives a reference, such as "Passport seen in person, HR record 4417". The note must not contain the ID number itself. The confirmation is of the account's name and email address as they are then: if either changes, the person cannot sign until an administrator checks them and confirms them again. Envelopes are sent, and signed, in the confirmed name.
4. `[A second administrator reviews new confirmations within N days.]`
5. When a person leaves or changes role, the administrator takes back their identity confirmation the same day, then closes or limits the account.
6. Every `[quarter]`, an administrator reviews every confirmed account against the current staff list, and records the review.
diff --git a/docs/part11/requirements.md b/docs/part11/requirements.md
index f04f289..3d5d26b 100644
--- a/docs/part11/requirements.md
+++ b/docs/part11/requirements.md
@@ -21,17 +21,17 @@ Document `[ID]`, version `[1.0]`, approved by `[name, role, date]`.
## Signers and signatures
-| ID | Requirement | Part 11 |
-| ------ | -------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------- |
-| SIG-01 | Each signer signs with their own account, which belongs to one person and is not reused. | 11.100(a) |
-| SIG-02 | A record is not sent unless an administrator has confirmed each signer's identity and recorded how. | 11.100(b) |
-| SIG-03 | A signer whose identity confirmation is taken back, or whose email is no longer confirmed, cannot sign. | 11.100(b) |
-| SIG-04 | The signer gives two components, email address and password, to open the record and again at each signature. | 11.200(a)(1) |
-| SIG-05 | Each signature shows the signer's printed name, the date and time (UTC), and its meaning. The same information appears in the certificate. | 11.50(a), (b) |
-| SIG-06 | The signer confirms the meaning of their signature before signing. | 11.50(a)(3) |
-| SIG-07 | The signature is linked to its record, and the seal makes it impossible to copy onto another record undetected. | 11.70 |
-| SIG-08 | Passwords are at least 15 characters long and are checked against known breached passwords. | 11.300(a), (b) |
-| SIG-09 | After five wrong passwords in a row while signing, the account can no longer sign until an administrator unlocks it, and every administrator is emailed. | 11.300(d) |
+| ID | Requirement | Part 11 |
+| ------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------- |
+| SIG-01 | Each signer signs with their own account, which belongs to one person and is not reused. | 11.100(a) |
+| SIG-02 | A record is not sent unless an administrator has confirmed each signer's identity and recorded how, and each signer is named as the person confirmed. | 11.100(b) |
+| SIG-03 | A signer whose identity confirmation is taken back, whose account's name or email address changed since it was confirmed, or whose email is no longer confirmed, cannot sign. | 11.100(b) |
+| SIG-04 | The signer gives two components, email address and password, to open the record and again at each signature. | 11.200(a)(1) |
+| SIG-05 | Each signature shows the signer's printed name, the date and time (UTC), and its meaning. The same information appears in the certificate. | 11.50(a), (b) |
+| SIG-06 | The signer confirms the meaning of their signature before signing. | 11.50(a)(3) |
+| SIG-07 | The signature is linked to its record, and the seal makes it impossible to copy onto another record undetected. | 11.70 |
+| SIG-08 | Passwords are at least 15 characters long and are checked against known breached passwords. | 11.300(a), (b) |
+| SIG-09 | After five wrong passwords in a row while signing, the account can no longer sign until an administrator unlocks it, and every administrator is emailed. | 11.300(d) |
## Procedural requirements (met by your procedures, not by the software)
diff --git a/src/lib/bulk-send.dbtest.ts b/src/lib/bulk-send.dbtest.ts
index bf7a8ed..95f5c79 100644
--- a/src/lib/bulk-send.dbtest.ts
+++ b/src/lib/bulk-send.dbtest.ts
@@ -649,8 +649,9 @@ test("retrying a confirmed Part 11 batch keeps a skipped row skipped after the s
await database.query(
`
insert into public."user" (
- id, name, email, role, "emailVerified", identity_verified_at, signing_locked_at
- ) values ($1, 'Ann Ready', $2, 'user', true, 1, null)
+ id, name, email, role, "emailVerified", identity_verified_at, signing_locked_at,
+ identity_verified_name, identity_verified_email
+ ) values ($1, 'Ann Ready', $2, 'user', true, 1, null, 'Ann Ready', $2)
`,
[readyUserId, readyEmail],
);
@@ -713,8 +714,9 @@ test("retrying a confirmed Part 11 batch keeps a skipped row skipped after the s
await database.query(
`
insert into public."user" (
- id, name, email, role, "emailVerified", identity_verified_at, signing_locked_at
- ) values ($1, 'Ada Later', $2, 'user', true, 1, null)
+ id, name, email, role, "emailVerified", identity_verified_at, signing_locked_at,
+ identity_verified_name, identity_verified_email
+ ) values ($1, 'Ada Later', $2, 'user', true, 1, null, 'Ada Later', $2)
`,
[skippedUserId, skippedEmail],
);
@@ -755,6 +757,84 @@ test("retrying a confirmed Part 11 batch keeps a skipped row skipped after the s
}
});
+test("a Part 11 row goes out only in the confirmed person's name, and is signed in that name", async () => {
+ const userId = await createUser();
+ const template = await createOneRoleTemplate(userId);
+ const accountEmail = `alice-${randomUUID()}@example.test`;
+ const accountId = randomUUID();
+
+ createdUsers.push(accountId);
+ await database.query(
+ `
+ insert into public."user" (
+ id, name, email, role, "emailVerified", identity_verified_at, signing_locked_at,
+ identity_verified_name, identity_verified_email
+ ) values ($1, 'Alice Account Holder', $2, 'user', true, 1, null, 'Alice Account Holder', $2)
+ `,
+ [accountId, accountEmail],
+ );
+
+ const previous = await database.query<{ part11_mode: boolean }>(
+ `select part11_mode from app_settings where id`,
+ );
+
+ await database.query(
+ `
+ insert into app_settings (id, signup_mode, created_at, updated_at, part11_mode)
+ values (true, 'open', 1, 1, true)
+ on conflict (id) do update set part11_mode = true
+ `,
+ );
+
+ try {
+ const refused = await bulkSendFromTemplate(
+ userId,
+ template.id,
+ confirmBody(`name,email\nDr Victim Name,${accountEmail}\n`, {
+ signatureMeaning: "approval",
+ }),
+ { ...options(), sender: senderFor(userId) },
+ );
+
+ assert.equal(refused.rows[0]?.status, "skipped");
+ assert.match(
+ refused.rows[0]?.reason ?? "",
+ /confirmed as Alice Account Holder/,
+ );
+
+ // The same person written another way still goes.
+ const result = await bulkSendFromTemplate(
+ userId,
+ template.id,
+ confirmBody(`name,email\nalice holder,${accountEmail.toUpperCase()}\n`, {
+ signatureMeaning: "approval",
+ }),
+ { ...options(), sender: senderFor(userId) },
+ );
+
+ assert.equal(result.rows[0]?.status, "sent", result.rows[0]?.reason ?? "");
+
+ const signer = await database.query<{ name: string; userId: string }>(
+ `select name, user_id as "userId" from signers where envelope_id = $1`,
+ [result.rows[0]?.envelopeId],
+ );
+
+ // Named as the administrator confirmed them, not as the CSV had it.
+ assert.deepEqual(signer.rows, [
+ { name: "Alice Account Holder", userId: accountId },
+ ]);
+ } finally {
+ if (previous.rowCount) {
+ await database.query(
+ `update app_settings set part11_mode = $1 where id`,
+ [previous.rows[0]!.part11_mode],
+ );
+ } else {
+ await database.query(`delete from app_settings where id`);
+ }
+ }
+});
+
test("sending without the permitted-use confirmation is refused, and so is an empty CSV", async () => {
const userId = await createUser();
const template = await createOneRoleTemplate(userId);
diff --git a/src/lib/envelopes.ts b/src/lib/envelopes.ts
index 7db1bba..347487e 100644
--- a/src/lib/envelopes.ts
+++ b/src/lib/envelopes.ts
@@ -2759,7 +2759,10 @@ export async function sendDraftEnvelope(
}
}
- const part11SignerAccounts = new Map<string, string>();
+ const part11SignerAccounts = new Map<
+ string,
+ { name: string; userId: string }
+ >();
if (part11) {
const checks = await listSignerCheckSettings(envelopeId, database);
@@ -2786,7 +2789,10 @@ export async function sendDraftEnvelope(
);
}
- part11SignerAccounts.set(signer.id, account.userId);
+ part11SignerAccounts.set(signer.id, {
+ name: account.name,
+ userId: account.userId,
+ });
}
}
@@ -2938,16 +2944,19 @@ export async function sendDraftEnvelope(
envelopeId,
]);
- for (const [signerId, accountId] of part11SignerAccounts) {
+ // Each signer is bound to their account and named as the
+ // administrator confirmed them, so the signature and its audit
+ // record carry the confirmed name, not one typed for the draft.
+ for (const [signerId, account] of part11SignerAccounts) {
const bound = await tx.query(
`
UPDATE signers
- SET user_id = $1
+ SET user_id = $1, name = $4
WHERE id = $2
AND envelope_id = $3
AND signature_meaning IS NOT NULL
`,
- [accountId, signerId, envelopeId],
+ [account.userId, signerId, envelopeId, account.name],
);
if (bound.rowCount !== 1) {
diff --git a/src/lib/name-match.ts b/src/lib/name-match.ts
new file mode 100644
index 0000000..334dde4
--- /dev/null
+++ b/src/lib/name-match.ts
@@ -0,0 +1,35 @@
+/**
+ * A name's words, without case, accents, punctuation or numbers. An
+ * apostrophe joins the letters around it, so O'Connor and OConnor are the
+ * same word; other punctuation, such as a hyphen, separates words.
+ */
+export function nameWords(name: string): Set<string> {
+ return new Set(
+ name
+ .replace(/['`´‘’ʼ]/gu, "")
+ .normalize("NFKD")
+ .replace(/\p{M}+/gu, "")
+ .toLocaleLowerCase("en")
+ .split(/[^\p{L}\p{N}]+/u)
+ .filter((word) => word.length > 0 && !/\p{N}/u.test(word)),
+ );
+}
+
+/**
+ * Whether two names are the same person's. Case, accents, punctuation and
+ * word order do not count, nor do numbers. A name may have words the other
+ * lacks, such as a middle name or a title, as long as at least two words
+ * match and every word of the shorter name is in the longer; a one-word name
+ * has to match exactly.
+ */
+export function namesMatch(first: string, second: string): boolean {
+ const a = nameWords(first);
+ const b = nameWords(second);
+ const [shorter, longer] = a.size <= b.size ? [a, b] : [b, a];
+
+ return (
+ shorter.size > 0 &&
+ [...shorter].every((word) => longer.has(word)) &&
+ (shorter.size >= 2 || a.size === b.size)
+ );
+}
diff --git a/src/lib/part11.dbtest.ts b/src/lib/part11.dbtest.ts
index 9691fe9..bd53819 100644
--- a/src/lib/part11.dbtest.ts
+++ b/src/lib/part11.dbtest.ts
@@ -10,6 +10,7 @@ import {
checkSigningCredentials,
MAX_SIGNING_PASSWORD_ATTEMPTS,
type PasswordVerifier,
+ setIdentityVerification,
} from "./part11.ts";
import type {
EmailService,
@@ -48,8 +49,9 @@ async function createUser(role: "admin" | "user" = "user") {
await database.query(
`
insert into public."user" (
- id, name, email, role, "emailVerified", identity_verified_at
- ) values ($1, $2, $3, $4, true, 1)
+ id, name, email, role, "emailVerified", identity_verified_at,
+ identity_verified_name, identity_verified_email
+ ) values ($1, $2, $3, $4, true, 1, $2, $3)
`,
[id, `Person ${id.slice(0, 4)}`, `${id}@example.test`, role],
);
@@ -296,3 +298,103 @@ test("an identity confirmation taken back after send stops the signature", async
},
);
});
+
+const NOT_CONFIRMED = {
+ attemptsLeft: MAX_SIGNING_PASSWORD_ATTEMPTS,
+ identityNotConfirmed: true,
+ locked: false,
+ ok: false,
+};
+
+test("a confirmation stops counting once the account's name or address changes", async () => {
+ for (const change of [
+ `update "user" set name = 'Someone Else' where id = $1`,
+ `update "user" set email = 'moved-' || email where id = $1`,
+ ]) {
+ const user = await createUser();
+ const { rows } = await database.query<{ email: string }>(
+ `${change} returning email`,
+ [user.id],
+ );
+
+ assert.deepEqual(
+ await checkSigningCredentials(
+ { email: rows[0]!.email, password: "right", userId: user.id },
+ { database, verifyPassword },
+ ),
+ NOT_CONFIRMED,
+ change,
+ );
+ }
+});
+
+test("a signature is refused in a name other than the confirmed person's", async () => {
+ const user = await createUser();
+ const { rows } = await database.query<{ name: string }>(
+ `select name from "user" where id = $1`,
+ [user.id],
+ );
+
+ assert.deepEqual(
+ await checkSigningCredentials(
+ {
+ email: user.email,
+ password: "right",
+ signerName: "Dr Victim Name",
+ userId: user.id,
+ },
+ { database, verifyPassword },
+ ),
+ NOT_CONFIRMED,
+ );
+ assert.deepEqual(
+ await checkSigningCredentials(
+ {
+ email: user.email,
+ password: "right",
+ signerName: rows[0]!.name,
+ userId: user.id,
+ },
+ { database, verifyPassword },
+ ),
+ { ok: true },
+ );
+});
+
+test("confirming someone again after a name change lets them sign in the new name", async () => {
+ const admin = await createUser("admin");
+ const user = await createUser();
+
+ await database.query(
+ `update "user" set name = 'Alice Married Name' where id = $1`,
+ [user.id],
+ );
+ await setIdentityVerification(
+ { email: admin.email, userId: admin.id },
+ user.id,
+ { note: "Saw the new passport", verified: true },
+ database,
+ );
+
+ const { rows } = await database.query<{
+ email: string;
+ name: string;
+ }>(
+ `select identity_verified_name as name, identity_verified_email as email from "user" where id = $1`,
+ [user.id],
+ );
+
+ assert.deepEqual(rows[0], { email: user.email, name: "Alice Married Name" });
+ assert.deepEqual(
+ await checkSigningCredentials(
+ {
+ email: user.email,
+ password: "right",
+ signerName: "Alice Married Name",
+ userId: user.id,
+ },
+ { database, verifyPassword },
+ ),
+ { ok: true },
+ );
+});
diff --git a/src/lib/part11.test.ts b/src/lib/part11.test.ts
index fe7ddfb..aee20ef 100644
--- a/src/lib/part11.test.ts
+++ b/src/lib/part11.test.ts
@@ -87,6 +87,34 @@ test("a send is refused for each missing Part 11 condition, in order", () => {
);
});
+test("a Part 11 send is refused in a name other than the confirmed person's", () => {
+ const account = {
+ email: "[email protected]",
+ emailVerified: true,
+ identityVerifiedAt: 1,
+ name: "Alice B. Holder",
+ signingLockedAt: null,
+ userId: "u1",
+ };
+ const signer = {
+ email: "[email protected]",
+ signatureMeaning: "approval" as const,
+ };
+
+ assert.match(
+ describePart11SignerProblem(
+ { ...signer, name: "Dr Victim Name" },
+ account,
+ ) ?? "",
+ /confirmed as Alice B\. Holder/,
+ );
+ // The same person written another way still goes.
+ assert.equal(
+ describePart11SignerProblem({ ...signer, name: "alice holder" }, account),
+ null,
+ );
+});
+
test("a signer bound to an account must pass the account check first", () => {
assert.deepEqual(
requiredSignerChecks({
diff --git a/src/lib/part11.ts b/src/lib/part11.ts
index 8751296..028743b 100644
--- a/src/lib/part11.ts
+++ b/src/lib/part11.ts
@@ -7,6 +7,7 @@ import {
withTransaction,
} from "./db/connection.ts";
import { SIGNUDOC_NAME } from "./branding.ts";
+import { namesMatch } from "./name-match.ts";
import { createEmailService, type EmailService } from "./services/email.ts";
import { recordSystemAuditEvent } from "./services/system-audit.ts";
import { getBranding, getSettings } from "./settings.ts";
@@ -54,6 +55,20 @@ export async function isPart11ModeOn(): Promise<boolean> {
return (await getSettings()).part11Mode;
}
+/**
+ * When an administrator confirmed who an account's holder is, as long as
+ * the account still has the name and email address they confirmed, or
+ * null. A confirmation is of a person: once the account's name or address
+ * changes it no longer says who signs with it. `u` is the "user" row.
+ */
+export const CURRENT_IDENTITY_VERIFIED_AT_SQL = `
+ CASE
+ WHEN u.identity_verified_name IS NOT DISTINCT FROM u.name
+ AND lower(u.identity_verified_email) = lower(u.email)
+ THEN u.identity_verified_at
+ END
+`;
+
export type Part11SignerAccount = {
email: string;
emailVerified: boolean;
@@ -80,7 +95,7 @@ export async function findSignerAccounts(
u.email,
u.name,
u."emailVerified" AS "emailVerified",
- u.identity_verified_at AS "identityVerifiedAt",
+ ${CURRENT_IDENTITY_VERIFIED_AT_SQL} AS "identityVerifiedAt",
u.signing_locked_at AS "signingLockedAt"
FROM "user" u
WHERE lower(u.email) = ANY($1)
@@ -115,6 +130,12 @@ export function describePart11SignerProblem(
return `An administrator has to confirm ${signer.name}'s identity under Settings, People before they can sign.`;
}
+ // The signature is shown and recorded under the confirmed person's name,
+ // so the envelope has to be sent to that person, not under another name.
+ if (!namesMatch(signer.name, account.name)) {
+ return `The account for ${signer.email} is confirmed as ${account.name}. Part 11 signatures are made in the confirmed name, so use that name for this signer.`;
+ }
+
if (account.signingLockedAt !== null) {
return `${signer.name}'s account is locked for signing after too many wrong passwords. An administrator can unlock it under Settings, People.`;
}
@@ -221,12 +242,14 @@ export async function setIdentityVerification(
identity_verified_at = $1,
identity_verified_by = $2,
identity_verification_note = $3,
+ identity_verified_name = $4,
+ identity_verified_email = $5,
"updatedAt" = now()
- WHERE id = $4
+ WHERE id = $6
`,
input.verified
- ? [now, actor.userId, note, targetUserId]
- : [null, null, null, targetUserId],
+ ? [now, actor.userId, note, target.name, target.email, targetUserId]
+ : [null, null, null, null, null, targetUserId],
);
await recordSystemAuditEvent(
{
@@ -335,6 +358,12 @@ export async function checkSigningCredentials(
email: string;
ipAddress?: string | null;
password: string;
+ /**
+ * The name the signature is made in. It has to be the confirmed
+ * person's: a confirmation of someone else, made after the envelope was
+ * sent, does not count for it.
+ */
+ signerName?: string;
userAgent?: string | null;
userId: string;
},
@@ -366,7 +395,7 @@ export async function checkSigningCredentials(
u.signing_failed_attempts AS "failedAttempts",
u.signing_locked_at AS "lockedAt",
u."emailVerified" AS "emailVerified",
- u.identity_verified_at AS "identityVerifiedAt",
+ ${CURRENT_IDENTITY_VERIFIED_AT_SQL} AS "identityVerifiedAt",
(
SELECT a.password FROM account a
WHERE a."userId" = u.id AND a."providerId" = 'credential'
@@ -389,7 +418,12 @@ export async function checkSigningCredentials(
// Checked again at every signature: what was true at send may not be
// now. Not a wrong password, so it does not count towards the lock.
- if (!account.emailVerified || account.identityVerifiedAt === null) {
+ if (
+ !account.emailVerified ||
+ account.identityVerifiedAt === null ||
+ (input.signerName !== undefined &&
+ !namesMatch(input.signerName, account.name))
+ ) {
return {
attemptsLeft: Math.max(
0,
diff --git a/src/lib/people.ts b/src/lib/people.ts
index 8aec6d0..beee0b2 100644
--- a/src/lib/people.ts
+++ b/src/lib/people.ts
@@ -7,6 +7,7 @@ import {
withTransaction,
} from "./db/connection.ts";
import { revokeApiKeysForUser } from "./api-keys.ts";
+import { CURRENT_IDENTITY_VERIFIED_AT_SQL } from "./part11.ts";
import type { RequestClient } from "./security/request.ts";
import { recordSystemAuditEvent } from "./services/system-audit.ts";
@@ -88,7 +89,7 @@ const PERSON_COLUMNS = `
u.role,
u."emailVerified" AS "emailVerified",
u."createdAt" AS "createdAt",
- u.identity_verified_at AS "identityVerifiedAt",
+ ${CURRENT_IDENTITY_VERIFIED_AT_SQL} AS "identityVerifiedAt",
u.identity_verification_note AS "identityVerificationNote",
u.signing_locked_at AS "signingLockedAt",
u."twoFactorEnabled" AS "twoFactorEnabled",
diff --git a/src/lib/services/signer-cms.ts b/src/lib/services/signer-cms.ts
index aefd3c2..27d46c7 100644
--- a/src/lib/services/signer-cms.ts
+++ b/src/lib/services/signer-cms.ts
@@ -20,6 +20,7 @@ import {
type Tlv,
} from "./der.ts";
import { parseCertificate, type Certificate } from "./pdf-ltv.ts";
+import { namesMatch } from "../name-match.ts";
// The CMS of one signer's own signature (CAdES, as PAdES uses it).
//
@@ -706,23 +707,6 @@ export function certificateHolderNames(certificate: Certificate): string[] {
];
}
-/**
- * A name's words, without case, accents, punctuation or numbers. An
- * apostrophe joins the letters around it, so O'Connor and OConnor are the
- * same word; other punctuation, such as a hyphen, separates words.
- */
-function nameWords(name: string): Set<string> {
- return new Set(
- name
- .replace(/['`\u00B4\u2018\u2019\u02BC]/gu, "")
- .normalize("NFKD")
- .replace(/\p{M}+/gu, "")
- .toLocaleLowerCase("en")
- .split(/[^\p{L}\p{N}]+/u)
- .filter((word) => word.length > 0 && !/\p{N}/u.test(word)),
- );
-}
-
/**
* Whether a certificate is in the name a signer was sent the document
* under. Case, accents, punctuation and word order do not count, nor do
@@ -735,19 +719,9 @@ export function certificateMatchesName(
certificate: Certificate,
invitedName: string,
): boolean {
- const invited = nameWords(invitedName);
-
- return certificateHolderNames(certificate).some((name) => {
- const words = nameWords(name);
- const [shorter, longer] =
- words.size <= invited.size ? [words, invited] : [invited, words];
-
- return (
- shorter.size > 0 &&
- [...shorter].every((word) => longer.has(word)) &&
- (shorter.size >= 2 || words.size === invited.size)
- );
- });
+ return certificateHolderNames(certificate).some((name) =>
+ namesMatch(name, invitedName),
+ );
}
/**
diff --git a/src/lib/signing.ts b/src/lib/signing.ts
index adbdf72..e3bca6e 100644
--- a/src/lib/signing.ts
+++ b/src/lib/signing.ts
@@ -1600,6 +1600,7 @@ export async function verifySignerCheck(
email: parsed.email,
ipAddress: requestMeta.ipAddress ?? null,
password: parsed.password,
+ signerName: context.signer.name,
userAgent: requestMeta.userAgent ?? null,
userId: state.accountUserId!,
},
@@ -2191,6 +2192,7 @@ async function reauthenticatePart11Signer(
email: reauthentication.email,
ipAddress: requestMeta.ipAddress ?? null,
password: reauthentication.password,
+ signerName: context.signer.name,
userAgent: requestMeta.userAgent ?? null,
userId: state.accountUserId,
},