@djangocfg/api 2.1.423 → 2.1.424

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.
package/dist/auth.d.cts CHANGED
@@ -294,13 +294,6 @@ interface UseAuthFormOptions {
294
294
  requireTermsAcceptance?: boolean;
295
295
  /** Path to auth page for auto-OTP detection. Default: '/auth' */
296
296
  authPath?: string;
297
- /**
298
- * Enable 2FA setup prompt after successful authentication.
299
- * When true (default), users without 2FA will see a setup prompt after login.
300
- * When false, users go directly to success without 2FA setup prompt.
301
- * @default true
302
- */
303
- enable2FASetup?: boolean;
304
297
  }
305
298
 
306
299
  type UserProfile = User;
package/dist/auth.d.ts CHANGED
@@ -294,13 +294,6 @@ interface UseAuthFormOptions {
294
294
  requireTermsAcceptance?: boolean;
295
295
  /** Path to auth page for auto-OTP detection. Default: '/auth' */
296
296
  authPath?: string;
297
- /**
298
- * Enable 2FA setup prompt after successful authentication.
299
- * When true (default), users without 2FA will see a setup prompt after login.
300
- * When false, users go directly to success without 2FA setup prompt.
301
- * @default true
302
- */
303
- enable2FASetup?: boolean;
304
297
  }
305
298
 
306
299
  type UserProfile = User;
package/dist/auth.mjs CHANGED
@@ -2455,8 +2455,7 @@ var useAuthForm = /* @__PURE__ */ __name((options) => {
2455
2455
  sourceUrl,
2456
2456
  redirectUrl,
2457
2457
  requireTermsAcceptance = false,
2458
- authPath = "/auth",
2459
- enable2FASetup = true
2458
+ authPath = "/auth"
2460
2459
  } = options;
2461
2460
  const formState = useAuthFormState();
2462
2461
  const validation = useAuthValidation();
@@ -2592,18 +2591,7 @@ var useAuthForm = /* @__PURE__ */ __name((options) => {
2592
2591
  }
2593
2592
  if (result.success) {
2594
2593
  saveIdentifierToStorage(submitIdentifier);
2595
- if (result.should_prompt_2fa && enable2FASetup) {
2596
- authLogger.info("OTP verification successful, prompting 2FA setup");
2597
- setShouldPrompt2FA(true);
2598
- setStep("2fa-setup");
2599
- onOTPSuccess?.();
2600
- return true;
2601
- }
2602
- if (result.should_prompt_2fa && !enable2FASetup) {
2603
- authLogger.info("OTP verification successful, skipping 2FA setup prompt (disabled)");
2604
- } else {
2605
- authLogger.info("OTP verification successful, showing success screen");
2606
- }
2594
+ authLogger.info("OTP verification successful, showing success screen");
2607
2595
  setStep("success");
2608
2596
  onOTPSuccess?.();
2609
2597
  return true;
@@ -2620,7 +2608,7 @@ var useAuthForm = /* @__PURE__ */ __name((options) => {
2620
2608
  } finally {
2621
2609
  setIsLoading(false);
2622
2610
  }
2623
- }, [verifyOTP, saveIdentifierToStorage, setError, setIsLoading, clearError, onOTPSuccess, onError, sourceUrl, redirectUrl, setTwoFactorSessionId, setShouldPrompt2FA, setStep, enable2FASetup]);
2611
+ }, [verifyOTP, saveIdentifierToStorage, setError, setIsLoading, clearError, onOTPSuccess, onError, sourceUrl, redirectUrl, setTwoFactorSessionId, setShouldPrompt2FA, setStep]);
2624
2612
  const handleOTPSubmit = useCallback5(async (e) => {
2625
2613
  e.preventDefault();
2626
2614
  await submitOTP(identifier, otp);