[GH-ISSUE #3298] In the documentation page for the "Have I Been Pwned" plugin (https://www.better-auth.com/docs/plugins/have-i-been-pwned), the example code block does not indicate which file it should go into. #9560

Closed
opened 2026-04-13 05:04:36 -05:00 by GiteaMirror · 3 comments
Owner

Originally created by @MatteoUrso on GitHub (Jul 8, 2025).
Original GitHub issue: https://github.com/better-auth/better-auth/issues/3298

Is this suited for github?

  • Yes, this is suited for github

To Reproduce

  1. Go to Have I Been Pwned Plugin
  2. Scroll to Installation section
  3. Observe that there's no mention of which file the code should be added to.
  4. As a result, it's unclear to the reader where this code belongs (e.g., in auth.ts).

Current vs. Expected behavior

Current: The code block under the "Have I Been Pwned" plugin section does not specify which file the code should be added to. This may cause confusion for users unfamiliar with the structure of the project.

Expected: The documentation should explicitly state that the code belongs in the auth.ts file, either as a comment above the code block or as a sentence in the accompanying text.

What version of Better Auth are you using?

1.2.12

Provide environment information

- OS: Windows 10
- Browser: Chrome

Which area(s) are affected? (Select all that apply)

Documentation

Auth config (if applicable)


Additional context

No response

Originally created by @MatteoUrso on GitHub (Jul 8, 2025). Original GitHub issue: https://github.com/better-auth/better-auth/issues/3298 ### Is this suited for github? - [x] Yes, this is suited for github ### To Reproduce 1. Go to [Have I Been Pwned Plugin](https://www.better-auth.com/docs/plugins/have-i-been-pwned) 2. Scroll to Installation section 3. Observe that there's no mention of which file the code should be added to. 4. As a result, it's unclear to the reader where this code belongs (e.g., in auth.ts). ### Current vs. Expected behavior Current: The code block under the "Have I Been Pwned" plugin section does not specify which file the code should be added to. This may cause confusion for users unfamiliar with the structure of the project. Expected: The documentation should explicitly state that the code belongs in the auth.ts file, either as a comment above the code block or as a sentence in the accompanying text. ### What version of Better Auth are you using? 1.2.12 ### Provide environment information ```bash - OS: Windows 10 - Browser: Chrome ``` ### Which area(s) are affected? (Select all that apply) Documentation ### Auth config (if applicable) ```typescript ``` ### Additional context _No response_
GiteaMirror added the locked label 2026-04-13 05:04:36 -05:00
Author
Owner

@dosubot[bot] commented on GitHub (Jul 8, 2025):

Hi @MatteoUrso! I'm Dosu and I’m helping the better-auth team.

You're right—the "Have I Been Pwned" plugin documentation doesn't specify which file the example code should go in, which can be confusing for new users. All official Better Auth examples and demos consistently place plugin configuration in a file named auth.ts (like src/auth.ts or lib/auth.ts), and this is the expected location for plugin setup in real projects. It would be clearer if the documentation explicitly stated that the example code belongs in auth.ts or included a comment above the code block to that effect. There are currently no issues or discussions tracking this documentation gap, so this is a valid suggestion for improvement based on established conventions in the codebase and examples (example, plugin docs).

To reply, just mention @dosu.


How did I do? Good | Irrelevant | Incorrect | Verbose | Hallucination | Report 🐛 | Other  Join Discord Share on X

<!-- gh-comment-id:3048139501 --> @dosubot[bot] commented on GitHub (Jul 8, 2025): <!-- Greeting --> Hi @MatteoUrso! I'm [Dosu](https://go.dosu.dev/dosubot) and I’m helping the better-auth team. <!-- Answer --> You're right—the "Have I Been Pwned" plugin documentation doesn't specify which file the example code should go in, which can be confusing for new users. All official Better Auth examples and demos consistently place plugin configuration in a file named `auth.ts` (like `src/auth.ts` or `lib/auth.ts`), and this is the expected location for plugin setup in real projects. It would be clearer if the documentation explicitly stated that the example code belongs in `auth.ts` or included a comment above the code block to that effect. There are currently no issues or discussions tracking this documentation gap, so this is a valid suggestion for improvement based on established conventions in the codebase and examples ([example](https://github.com/better-auth/better-auth/blob/c483fa14db62b3a8d82049a167f9933c0542af7d/examples/astro-example/src/auth.ts), [plugin docs](https://github.com/better-auth/better-auth/blob/c483fa14db62b3a8d82049a167f9933c0542af7d/docs/content/docs/plugins/have-i-been-pwned.mdx)). <!-- Dosu Comment Footer --> *To reply, just mention [@dosu](https://go.dosu.dev/dosubot).* --- <sup>How did I do? [Good](https://app.dosu.dev/response-feedback/12e3b7a1-5a0b-4336-ae0a-6d870a6cadd6?feedback_type=great_response) | [Irrelevant](https://app.dosu.dev/response-feedback/12e3b7a1-5a0b-4336-ae0a-6d870a6cadd6?feedback_type=irrelevant_answer) | [Incorrect](https://app.dosu.dev/response-feedback/12e3b7a1-5a0b-4336-ae0a-6d870a6cadd6?feedback_type=incorrect_sources) | [Verbose](https://app.dosu.dev/response-feedback/12e3b7a1-5a0b-4336-ae0a-6d870a6cadd6?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/12e3b7a1-5a0b-4336-ae0a-6d870a6cadd6?feedback_type=hallucination) | [Report 🐛](https://app.dosu.dev/response-feedback/12e3b7a1-5a0b-4336-ae0a-6d870a6cadd6?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/12e3b7a1-5a0b-4336-ae0a-6d870a6cadd6?feedback_type=other)</sup>&nbsp;&nbsp;[![Join Discord](https://img.shields.io/badge/join-5865F2?logo=discord&logoColor=white&label=)](https://go.dosu.dev/discord-bot)&nbsp;[![Share on X](https://img.shields.io/badge/X-share-black)](https://twitter.com/intent/tweet?text=%40dosu_ai%20helped%20me%20solve%20this%20issue!&url=https%3A//github.com/better-auth/better-auth/issues/3298)
Author
Owner

@dagmawibabi commented on GitHub (Jul 14, 2025):

@MatteoUrso can't find the PR that fixes this, can you link it?

<!-- gh-comment-id:3071322254 --> @dagmawibabi commented on GitHub (Jul 14, 2025): @MatteoUrso can't find the PR that fixes this, can you link it?
Author
Owner

@MatteoUrso commented on GitHub (Jul 14, 2025):

@MatteoUrso can't find the PR that fixes this, can you link it?

Yes, https://github.com/better-auth/better-auth/pull/3299

<!-- gh-comment-id:3071328846 --> @MatteoUrso commented on GitHub (Jul 14, 2025): > @MatteoUrso can't find the PR that fixes this, can you link it? Yes, https://github.com/better-auth/better-auth/pull/3299
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/better-auth#9560