[PR #2961] [CLOSED] feat: [plugins/have-i-been-pwned] add support for disabling password compromise checks on specific paths #4573

Closed
opened 2026-03-13 11:51:27 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/better-auth/better-auth/pull/2961
Author: @tunctn
Created: 6/9/2025
Status: Closed

Base: mainHead: feat/add-disable-paths-to-haveibeenpwned-plugin


📝 Commits (2)

  • 6da2424 feat: add disabled paths option to have-i-been-pwned plugin
  • 15fd341 test: add test cases

📊 Changes

4 files changed (+139 additions, -22 deletions)

View changed files

📝 docs/content/docs/plugins/have-i-been-pwned.mdx (+9 -1)
📝 packages/better-auth/src/adapters/prisma-adapter/test/state.txt (+1 -1)
📝 packages/better-auth/src/plugins/haveibeenpwned/haveibeenpwned.test.ts (+103 -0)
📝 packages/better-auth/src/plugins/haveibeenpwned/index.ts (+26 -20)

📄 Description

added a new feature to the haveIBeenPwned plugin, allowing devs to specify paths where password compromise checks should be disabled. this is particularly useful for scenarios where certain endpoints, such as login pages, should not trigger password compromise checks.

key changes:

  • HaveIBeenPwnedOptions Interface: added a new optional property disabledPaths, which accepts an array of strings representing paths where the password compromise check should be bypassed.
  • path matcher logic: implemented logic in the before hook to skip password checks for requests matching any of the specified disabledPaths.
  • backward compatibility: the feature is optional and does not affect existing functionality unless disabledPaths is explicitly defined.

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/better-auth/better-auth/pull/2961 **Author:** [@tunctn](https://github.com/tunctn) **Created:** 6/9/2025 **Status:** ❌ Closed **Base:** `main` ← **Head:** `feat/add-disable-paths-to-haveibeenpwned-plugin` --- ### 📝 Commits (2) - [`6da2424`](https://github.com/better-auth/better-auth/commit/6da24241173b183ad8600e39faa18622a76b337a) feat: add disabled paths option to have-i-been-pwned plugin - [`15fd341`](https://github.com/better-auth/better-auth/commit/15fd3410e862ef3d98f20cc10c51f1987df77ff1) test: add test cases ### 📊 Changes **4 files changed** (+139 additions, -22 deletions) <details> <summary>View changed files</summary> 📝 `docs/content/docs/plugins/have-i-been-pwned.mdx` (+9 -1) 📝 `packages/better-auth/src/adapters/prisma-adapter/test/state.txt` (+1 -1) 📝 `packages/better-auth/src/plugins/haveibeenpwned/haveibeenpwned.test.ts` (+103 -0) 📝 `packages/better-auth/src/plugins/haveibeenpwned/index.ts` (+26 -20) </details> ### 📄 Description added a new feature to the haveIBeenPwned plugin, allowing devs to specify paths where password compromise checks should be disabled. this is particularly useful for scenarios where certain endpoints, such as login pages, should not trigger password compromise checks. key changes: - `HaveIBeenPwnedOptions` Interface: added a new optional property `disabledPaths`, which accepts an array of strings representing paths where the password compromise check should be bypassed. - path matcher logic: implemented logic in the `before` hook to skip password checks for requests matching any of the specified `disabledPaths`. - backward compatibility: the feature is optional and does not affect existing functionality unless `disabledPaths` is explicitly defined. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2026-03-13 11:51:27 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/better-auth#4573