Skip to content

fix(dashboard): allow password manager autofill on self-hosted auth forms - #12445

Open
De-pitcher wants to merge 5 commits into
novuhq:nextfrom
De-pitcher:fix/self-hosted-auth-autofill
Open

De-pitcher wants to merge 5 commits into
novuhq:nextfrom
De-pitcher:fix/self-hosted-auth-autofill

Conversation

@De-pitcher

@De-pitcher De-pitcher commented Aug 24, 2026

Copy link
Copy Markdown
Contributor

What changed? Why was the change needed?

Fixes #12267.

Since #7281 moved AUTOCOMPLETE_PASSWORD_MANAGERS_OFF into the shared Input primitive, every dashboard input — including self-hosted sign-in/sign-up/forgot-password/reset-password fields — renders with anti-autofill markers (autoComplete="off", data-1p-ignore, data-form-type="other"). Browsers and password managers therefore refuse to fill or save credentials on the self-hosted auth forms (Novu Cloud is unaffected because Clerk renders its own form).

This PR exempts the auth inputs from that suppression:

  • Adds an AUTOCOMPLETE_PASSWORD_MANAGERS_ON constant whose undefined values cancel the suppression attributes when spread after the shared default (InputEl applies caller props last, so the cancellation wins and React omits the removed attributes)
  • Auth fields now carry their standard identity tokens:
    • email → name="email" + autoComplete="email"
    • sign-in password → name="password" + autoComplete="current-password"
    • sign-up / reset password → autoComplete="new-password"
    • first/last name → given-name / family-name; organization → organization
  • Covered surfaces: community self-hosted SignIn/SignUp (self-hosted/components.tsx) and the better-auth SignIn/SignUp/ForgotPassword/ResetPassword forms

The workflow-editor and integration-credential use cases that motivated #6975/#7281 keep their suppression behavior unchanged — the base Input primitive is not modified.

Special notes for your reviewer

  • The cancellation relies on object-spread precedence: { ...OFF, ...ON, ...callerProps } resolves to data-1p-ignore: undefined, which React omits from the DOM entirely (passing false would still render "false", which 1Password treats as opted out).
  • No unit-test infrastructure exists in apps/dashboard today, so verification was done via typecheck (tsc -b clean for all touched files), Biome (no new diagnostics), and a spread-semantics check proving the final prop bag drops the suppression keys.

Greptile Summary

Restores browser and password-manager autofill on self-hosted authentication forms without changing the shared Input primitive’s default suppression behavior.

  • Adds a caller-side constant that cancels password-manager suppression attributes.
  • Applies standard field names and autocomplete tokens across sign-in, sign-up, forgot-password, and reset-password forms.
  • Keeps suppression enabled for unrelated dashboard inputs.

Confidence Score: 5/5

The PR appears safe to merge.

No blocking failure remains.

Important Files Changed

Filename Overview
apps/dashboard/src/utils/constants.ts Adds cancellation props whose undefined values override the shared suppression attributes when forwarded caller-last.
apps/dashboard/src/utils/better-auth/components/sign-in.tsx Enables credential autofill with standard email and current-password metadata.
apps/dashboard/src/utils/better-auth/components/sign-up.tsx Enables identity and new-password autofill metadata on account-registration fields.
apps/dashboard/src/utils/better-auth/components/forgot-password.tsx Enables email autofill on the password-recovery request form.
apps/dashboard/src/utils/better-auth/components/reset-password.tsx Marks both reset fields as new-password inputs and removes suppression attributes.
apps/dashboard/src/utils/self-hosted/components.tsx Enables standard autofill metadata across community self-hosted sign-in and registration forms.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart LR
  A[Shared Input defaults] --> B[Password-manager suppression]
  C[Auth field cancellation props] --> D[Caller props spread last]
  B --> D
  E[Field name and autocomplete token] --> D
  D --> F[Rendered auth input with autofill enabled]
Loading

Reviews (7): Last reviewed commit: "Merge branch 'next' into fix/self-hosted..." | Re-trigger Greptile

@netlify

netlify Bot commented Aug 24, 2026

Copy link
Copy Markdown

👷 Deploy request for dashboard-v2-novu-staging pending review.

Visit the deploys page to approve it

Name Link
🔨 Latest commit 4bfef52

@vercel

vercel Bot commented Aug 24, 2026

Copy link
Copy Markdown

@De-pitcher is attempting to deploy a commit to the Novu Team on Vercel.

A member of the Team first needs to authorize it.

@De-pitcher
De-pitcher force-pushed the fix/self-hosted-auth-autofill branch from 5f9d732 to 95aea31 Compare August 25, 2026 14:28
@De-pitcher De-pitcher closed this Aug 25, 2026
@De-pitcher De-pitcher reopened this Aug 25, 2026
@De-pitcher
De-pitcher marked this pull request as ready for review August 25, 2026 17:02
@De-pitcher

Copy link
Copy Markdown
Contributor Author

Thanks for the approval! This PR is ready to merge whenever you are — all checks green, rebased on latest next, and no conflicts.

Let me know if there's anything else you'd like to see before merging.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Dashboard: browser & password-manager autofill disabled on self-hosted sign-in / sign-up forms

1 participant