@bdking71/spsignature 1.3.3 → 1.3.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @file SecureAuditSignature.ts
2
+ * @file TransactionSigner.ts
3
3
  *
4
4
  * Provides a secure, auditable digital-signature workflow for SharePoint
5
5
  * web parts. The module renders a modal dialog that supports:
@@ -36,7 +36,7 @@ export interface SignerContext {
36
36
  channel?: DeliveryChannel;
37
37
  /**
38
38
  * Whether two-factor authentication is required.
39
- * Defaults to `true` when omitted or set to `undefined`.
39
+ * **Defaults to `false` (disabled).** Set to `true` to enable TFA.
40
40
  */
41
41
  requireTFA?: boolean;
42
42
  }
@@ -90,7 +90,7 @@ export interface AuditEnvelopeRecord {
90
90
  * payload: { amount: 1500, vendor: "Contoso" },
91
91
  * spContext: this.context,
92
92
  * channel: "email",
93
- * requireTFA: true,
93
+ * requireTFA: true, // Enable TFA
94
94
  * });
95
95
  * ```
96
96
  */
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  /**
3
- * @file SecureAuditSignature.ts
3
+ * @file TransactionSigner.ts
4
4
  *
5
5
  * Provides a secure, auditable digital-signature workflow for SharePoint
6
6
  * web parts. The module renders a modal dialog that supports:
@@ -69,7 +69,7 @@ function generateFiveDigitPasscode() {
69
69
  * payload: { amount: 1500, vendor: "Contoso" },
70
70
  * spContext: this.context,
71
71
  * channel: "email",
72
- * requireTFA: true,
72
+ * requireTFA: true, // Enable TFA
73
73
  * });
74
74
  * ```
75
75
  */
@@ -78,9 +78,11 @@ async function promptAndGenerateSecureAudit(context, modalTitle = "Approve Purch
78
78
  throw new Error("Execution restricted: Valid WebPartContext must be supplied.");
79
79
  }
80
80
  return new Promise((resolve) => {
81
- const requireTFA = context.requireTFA !== false;
81
+ // TFA is only enabled if explicitly set to true
82
+ const requireTFA = context.requireTFA === true;
82
83
  const generatedPasscode = generateFiveDigitPasscode();
83
84
  let storedVerificationItemId = undefined;
85
+ console.log("TFA Enabled:", requireTFA); // DEBUG
84
86
  // -----------------------------------------------------------------
85
87
  // Overlay
86
88
  // -----------------------------------------------------------------
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bdking71/spsignature",
3
- "version": "1.3.3",
3
+ "version": "1.3.5",
4
4
  "description": "SharePoint Framework isolated digital signing, LZW compression, and OTP audit engine.",
5
5
  "main": "lib/index.js",
6
6
  "module": "lib/index.js",